Network thread shutdown iterator fix

Thanks to @g1itch for pointing this out.
This commit is contained in:
Peter Šurda 2018-01-31 21:09:36 +01:00
parent 25a9e5ea45
commit 222e666a60
Signed by: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -20,17 +20,17 @@ class BMNetworkThread(threading.Thread, StoppableThread):
def stopThread(self):
super(BMNetworkThread, self).stopThread()
for i in BMConnectionPool().listeningSockets:
for i in BMConnectionPool().listeningSockets.values():
try:
i.close()
except:
pass
for i in BMConnectionPool().outboundConnections:
for i in BMConnectionPool().outboundConnections.values():
try:
i.close()
except:
pass
for i in BMConnectionPool().inboundConnections:
for i in BMConnectionPool().inboundConnections.values():
try:
i.close()
except: