From 916709a7e48a0be37d689beceb1a04d70a4b8cba Mon Sep 17 00:00:00 2001 From: shortcutme Date: Mon, 19 Jun 2017 16:13:06 +0200 Subject: [PATCH] Allow less peer error if for popular sites --- src/Peer/Peer.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Peer/Peer.py b/src/Peer/Peer.py index ff38e153..3734ed85 100644 --- a/src/Peer/Peer.py +++ b/src/Peer/Peer.py @@ -329,7 +329,11 @@ class Peer(object): # On connection error def onConnectionError(self, reason="Unknown"): self.connection_error += 1 - if self.connection_error >= 6: # Dead peer + if len(self.site.peers) > 200: + limit = 3 + else: + limit = 6 + if self.connection_error >= limit: # Dead peer self.remove("Peer connection: %s" % reason) # Done working with peer