No connected peers if no connection server

This commit is contained in:
shortcutme 2018-01-19 02:27:40 +01:00
parent a21c417c0b
commit 49a332724e
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 3 additions and 0 deletions

View File

@ -1028,6 +1028,9 @@ class Site(object):
def getConnectedPeers(self):
back = []
if not self.connection_server:
return []
tor_manager = self.connection_server.tor_manager
for connection in self.connection_server.connections:
if not connection.connected and time.time() - connection.start_time > 20: # Still not connected after 20s