20 sec timeout for listModified
This commit is contained in:
parent
da49981ecd
commit
09ad4133fb
1 changed files with 7 additions and 5 deletions
|
@ -289,11 +289,13 @@ class Site(object):
|
||||||
if not peers_try or len(queried) >= 3: # Stop after 3 successful query
|
if not peers_try or len(queried) >= 3: # Stop after 3 successful query
|
||||||
break
|
break
|
||||||
peer = peers_try.pop(0)
|
peer = peers_try.pop(0)
|
||||||
if not peer.connection and len(queried) < 2:
|
if config.verbose:
|
||||||
peer.connect() # Only open new connection if less than 2 queried already
|
self.log.debug("Try to get updates from: %s Left: %s" % (peer, peers_try))
|
||||||
if not peer.connection or peer.connection.handshake.get("rev", 0) < 126:
|
|
||||||
continue # Not compatible
|
res = None
|
||||||
|
with gevent.Timeout(20, exception=False):
|
||||||
res = peer.listModified(since)
|
res = peer.listModified(since)
|
||||||
|
|
||||||
if not res or "modified_files" not in res:
|
if not res or "modified_files" not in res:
|
||||||
continue # Failed query
|
continue # Failed query
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue