No connected peers if no connection server
This commit is contained in:
parent
a21c417c0b
commit
49a332724e
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue