From efa12c3ac6c58a6cfe90d651a01150b0aa271232 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Sat, 18 Jun 2016 20:35:16 +0200 Subject: [PATCH] Do not connect on shutdown - in some cases, such as when using trustedpeer, outgoingSynSender threads would wake up and try to connect. This fixes it. --- src/class_outgoingSynSender.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/class_outgoingSynSender.py b/src/class_outgoingSynSender.py index f01cbd5f..ca5ed056 100644 --- a/src/class_outgoingSynSender.py +++ b/src/class_outgoingSynSender.py @@ -96,6 +96,8 @@ class outgoingSynSender(threading.Thread, StoppableThread): shared.alreadyAttemptedConnectionsListLock.release() except threading.ThreadError as e: pass + if shared.shutdown: + break self.name = "outgoingSynSender-" + peer.host.replace(":", ".") # log parser field separator if peer.host.find(':') == -1: address_family = socket.AF_INET