Skip to content

Commit

Permalink
add log for network status and increase https pool size to 20
Browse files Browse the repository at this point in the history
  • Loading branch information
xxnet committed Apr 8, 2015
1 parent 318c8d2 commit 443e7e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions goagent/3.1.45/local/google_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ def update_ip(self, ip_str, handshake_time):
def report_connect_fail(self, ip_str, force_remove=False):
# ignore if system network is disconnected.
if time.time() - self.network_fail_time < 3:
#logging.debug("report_connect_fail network fail recently")
logging.debug("report_connect_fail network fail recently")
return
if not force_remove and not self.network_is_ok():
#logging.debug("report_connect_fail network fail")
logging.debug("report_connect_fail network fail")
return

self.ip_lock.acquire()
Expand Down Expand Up @@ -386,9 +386,11 @@ def network_is_ok(self):
return False

if check_ip.network_is_ok():
logging.debug("network is ok")
return True

self.network_fail_time = time.time()
logging.debug("network is fail")
return False

def remove_slowest_ip(self):
Expand Down
2 changes: 1 addition & 1 deletion goagent/3.1.45/local/proxy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ip_connect_interval = 10
[connect_manager]
https_max_connect_thread = 10
forward_max_connect_thread = 10
https_connection_pool_min = 5
https_connection_pool_min = 20
https_connection_pool_max = 50

[love]
Expand Down

0 comments on commit 443e7e8

Please sign in to comment.