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
1 changed files with 1 additions and 1 deletions

View File

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