From 582802190378dc1b2cfe9297e24b21487a02deb6 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 19 Jan 2017 19:50:40 +0100 Subject: [PATCH] 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 --- src/class_sendDataThread.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/class_sendDataThread.py b/src/class_sendDataThread.py index 79510f5a..5268138d 100644 --- a/src/class_sendDataThread.py +++ b/src/class_sendDataThread.py @@ -182,8 +182,8 @@ class sendDataThread(threading.Thread): elif command == 'connectionIsOrWasFullyEstablished': self.connectionIsOrWasFullyEstablished = True self.services, self.sslSock = data - else: - logger.error('sendDataThread ID: ' + str(id(self)) + ' ignoring command ' + command + ' because the thread is not in stream' + str(deststream)) + elif self.connectionIsOrWasFullyEstablished: + 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()