mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
IRCNetwork: abort when _send() fails to avoid deadlocks
This commit is contained in:
parent
c49147f232
commit
8f9b56e9d9
@ -1594,8 +1594,9 @@ class IRCNetwork(PyLinkNetworkCoreWithUtils):
|
||||
|
||||
try:
|
||||
self._socket.send(encoded_data)
|
||||
except (OSError, AttributeError):
|
||||
log.exception("(%s) Failed to send message %r; did the network disconnect?", self.name, data)
|
||||
except:
|
||||
log.exception("(%s) Failed to send message %r; aborting!", self.name, data)
|
||||
self.disconnect()
|
||||
|
||||
def send(self, data, queue=True):
|
||||
"""send() wrapper with optional queueing support."""
|
||||
|
Loading…
Reference in New Issue
Block a user