Fix network status in api

This commit is contained in:
Peter Šurda 2017-06-10 10:08:40 +02:00
parent ae97f7abd8
commit d34fdbb3f4
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -954,9 +954,9 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
return data
def HandleClientStatus(self, params):
if len(shared.connectedHostsList) == 0:
if len(network.stats.connectedHostsList()) == 0:
networkStatus = 'notConnected'
elif len(shared.connectedHostsList) > 0 and not shared.clientHasReceivedIncomingConnections:
elif len(network.stats.connectedHostsList()) > 0 and not shared.clientHasReceivedIncomingConnections:
networkStatus = 'connectedButHaveNotReceivedIncomingConnections'
else:
networkStatus = 'connectedAndReceivingIncomingConnections'