Fix error on exit for peers without site

This commit is contained in:
shortcutme 2017-06-20 20:28:35 +02:00
parent 71fbcee76c
commit a7b22e2055
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -329,7 +329,7 @@ class Peer(object):
# On connection error # On connection error
def onConnectionError(self, reason="Unknown"): def onConnectionError(self, reason="Unknown"):
self.connection_error += 1 self.connection_error += 1
if len(self.site.peers) > 200: if self.site and len(self.site.peers) > 200:
limit = 3 limit = 3
else: else:
limit = 6 limit = 6