Skip to content

Commit

Permalink
remove keep alive because it consume too many resource
Browse files Browse the repository at this point in the history
  • Loading branch information
debian committed Apr 14, 2015
1 parent cff1c2f commit 27d20a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ XX-Net

下载链接:
==========
https://codeload.github.com/XX-net/XX-Net/zip/1.8.6
https://codeload.github.com/XX-net/XX-Net/zip/1.8.7

(1.8.3之前的用户,请重新部署服务端)

Expand Down
8 changes: 5 additions & 3 deletions goagent/3.1.48/local/connect_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def to_string(self):
class Https_connection_manager(object):

thread_num_lock = threading.Lock()
keep_alive = False

def __init__(self):
# http://docs.python.org/dev/library/ssl.html
Expand All @@ -179,9 +180,10 @@ def __init__(self):
if hasattr(OpenSSL.SSL, 'SESS_CACHE_BOTH'):
self.openssl_context.set_session_cache_mode(OpenSSL.SSL.SESS_CACHE_BOTH)

p = threading.Thread(target = self.keep_alive_thread)
p.daemon = True
p.start()
if self.keep_alive:
p = threading.Thread(target = self.keep_alive_thread)
p.daemon = True
p.start()

self.keep_alive = True

Expand Down

0 comments on commit 27d20a5

Please sign in to comment.