Skip to content

Commit

Permalink
Fix new ping behavior to work with --torify
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjarni R. Einarsson committed Jul 14, 2013
1 parent bede383 commit a03b312
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pagekite/pk.py
Expand Up @@ -2599,10 +2599,11 @@ def CheckAllTunnels(self, conns):
'69.164.211.158:443': '50.116.52.206:443',
}
def Ping(self, host, port):
cid = uuid = '%s:%s' % (host, port)

if self.servers_no_ping:
return 0
return (0, uuid)

cid = uuid = '%s:%s' % (host, port)
while ((cid not in self.ping_cache) or
(len(self.ping_cache[cid]) < 2) or
(time.time()-self.ping_cache[cid][0][0] > 60)):
Expand Down

0 comments on commit a03b312

Please sign in to comment.