Retry peers only once

This commit is contained in:
shortcutme 2019-04-19 02:38:02 +02:00
parent 7e78fbc16e
commit 129aff2c0c
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -146,7 +146,7 @@ class Peer(object):
self.log("Send request: %s %s %s %s" % (params.get("site", ""), cmd, params.get("inner_path", ""), params.get("location", ""))) self.log("Send request: %s %s %s %s" % (params.get("site", ""), cmd, params.get("inner_path", ""), params.get("location", "")))
for retry in range(1, 4): # Retry 3 times for retry in range(1, 2): # Retry 1 times
try: try:
if not self.connection: if not self.connection:
raise Exception("No connection found") raise Exception("No connection found")