Fix false error about wrong stream

- sendinv and sendaddress are sometimes being sent to connections that
  haven't been established yet, resulting in complaints about stream
  mismatch. The error should only be displayed once the connection has
  been established and the remote node provides its stream number
This commit is contained in:
Peter Šurda 2017-01-19 19:50:40 +01:00
parent 5ae1327edc
commit 5828021903
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -182,8 +182,8 @@ class sendDataThread(threading.Thread):
elif command == 'connectionIsOrWasFullyEstablished': elif command == 'connectionIsOrWasFullyEstablished':
self.connectionIsOrWasFullyEstablished = True self.connectionIsOrWasFullyEstablished = True
self.services, self.sslSock = data self.services, self.sslSock = data
else: elif self.connectionIsOrWasFullyEstablished:
logger.error('sendDataThread ID: ' + str(id(self)) + ' ignoring command ' + command + ' because the thread is not in stream' + str(deststream)) logger.error('sendDataThread ID: ' + str(id(self)) + ' ignoring command ' + command + ' because the thread is not in stream ' + str(deststream))
self.sendDataThreadQueue.task_done() self.sendDataThreadQueue.task_done()
self.sendDataThreadQueue.task_done() self.sendDataThreadQueue.task_done()