diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index b156cd0d..2a0762c1 100644 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -740,6 +740,8 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler): return data elif method == 'clientStatus': return '{ "networkConnections" : "%s" }' % str(len(shared.connectedHostsList)) + elif method == 'fullyConnected': + return '"%s"' % shared.definitelyFullyConnected else: return 'API Error 0020: Invalid method: %s' % method diff --git a/src/class_receiveDataThread.py b/src/class_receiveDataThread.py index 6adfe490..fd697d64 100644 --- a/src/class_receiveDataThread.py +++ b/src/class_receiveDataThread.py @@ -256,6 +256,7 @@ class receiveDataThread(threading.Thread): def connectionFullyEstablished(self): self.connectionIsOrWasFullyEstablished = True if not self.initiatedConnection: + shared.definitelyFullyConnected = True shared.UISignalQueue.put(('setStatusIcon', 'green')) self.sock.settimeout( 600) # We'll send out a pong every 5 minutes to make sure the connection stays alive if there has been no other traffic to send lately. diff --git a/src/shared.py b/src/shared.py index 214c124f..178db7df 100644 --- a/src/shared.py +++ b/src/shared.py @@ -47,6 +47,7 @@ inventory = {} #of objects (like msg payloads and pubkey payloads) Does not incl inventoryLock = threading.Lock() #Guarantees that two receiveDataThreads don't receive and process the same message concurrently (probably sent by a malicious individual) printLock = threading.Lock() appdata = '' #holds the location of the application data storage directory +definitelyFullyConnected = False statusIconColor = 'red' connectedHostsList = {} #List of hosts to which we are connected. Used to guarantee that the outgoingSynSender threads won't connect to the same remote node twice. shutdown = 0 #Set to 1 by the doCleanShutdown function. Used to tell the proof of work worker threads to exit.