Skip to content

Commit

Permalink
Longer timeout for non connected peers publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Mar 15, 2016
1 parent 7707c42 commit 11e09ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Site/Site.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,10 @@ def publisher(self, inner_path, peers, published, limit, event_done=None):
peer = peers.pop(0)
if peer.connection and peer.connection.last_ping_delay: # Peer connected
# Timeout: 5sec + size in kb + last_ping
timeout = timeout = 5 + int(file_size / 1024) + peer.connection.last_ping_delay
timeout = 5 + int(file_size / 1024) + peer.connection.last_ping_delay
else: # Peer not connected
# Timeout: 5sec + size in kb
timeout = timeout = 5 + int(file_size / 1024)
# Timeout: 10sec + size in kb
timeout = 10 + int(file_size / 1024)
result = {"exception": "Timeout"}

for retry in range(2):
Expand Down

0 comments on commit 11e09ad

Please sign in to comment.