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.
This commit is contained in:
Peter Šurda 2016-06-18 20:35:16 +02:00
parent cec2233043
commit efa12c3ac6
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -96,6 +96,8 @@ class outgoingSynSender(threading.Thread, StoppableThread):
shared.alreadyAttemptedConnectionsListLock.release() shared.alreadyAttemptedConnectionsListLock.release()
except threading.ThreadError as e: except threading.ThreadError as e:
pass pass
if shared.shutdown:
break
self.name = "outgoingSynSender-" + peer.host.replace(":", ".") # log parser field separator self.name = "outgoingSynSender-" + peer.host.replace(":", ".") # log parser field separator
if peer.host.find(':') == -1: if peer.host.find(':') == -1:
address_family = socket.AF_INET address_family = socket.AF_INET