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
1 changed files with 2 additions and 0 deletions

View File

@ -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