3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

Irc: fix disconnect logic in ping timeouts

Call disconnect() in the event of a ping timeout. Curse these extra indents!
This commit is contained in:
James Lu 2016-04-18 18:14:42 -07:00
parent 71fa4b941c
commit 534242ef29

View File

@ -270,10 +270,10 @@ class Irc():
log.warning('(%s) Disconnected from IRC: %s: %s',
self.name, type(e).__name__, str(e))
if not self.aborted.is_set():
# Only start a disconnection process if one doesn't already
# exist.
self.disconnect()
if not self.aborted.is_set():
# Only start a disconnection process if one doesn't already
# exist.
self.disconnect()
# Internal hook signifying that a network has disconnected.
self.callHooks([None, 'PYLINK_DISCONNECT', {}])