Asyncore update: Fix incoming connections

- dereferencing wasn't done correctly for incoming connections
This commit is contained in:
Peter Šurda 2017-07-08 07:33:29 +02:00
parent 2d7d9c2f92
commit 2df9598774
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -40,21 +40,20 @@ class ReceiveQueueThread(threading.Thread, StoppableThread):
try:
BMConnectionPool().inboundConnections[dest].process()
except KeyError:
try:
BMConnectionPool().inboundConnections[dest.host].process()
except KeyError:
pass
except AttributeError:
logger.error("Unknown state %s, ignoring", connection.state)
pass
try:
BMConnectionPool().outboundConnections[dest].process()
except KeyError:
except (KeyError, AttributeError):
pass
except AttributeError:
logger.error("Unknown state %s, ignoring", connection.state)
try:
BMConnectionPool().udpSockets[dest].process()
except KeyError:
except (KeyError, AttributeError):
pass
except AttributeError:
logger.error("Unknown state %s, ignoring", connection.state)