3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-26 04:32:51 +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', log.warning('(%s) Disconnected from IRC: %s: %s',
self.name, type(e).__name__, str(e)) self.name, type(e).__name__, str(e))
if not self.aborted.is_set(): if not self.aborted.is_set():
# Only start a disconnection process if one doesn't already # Only start a disconnection process if one doesn't already
# exist. # exist.
self.disconnect() self.disconnect()
# Internal hook signifying that a network has disconnected. # Internal hook signifying that a network has disconnected.
self.callHooks([None, 'PYLINK_DISCONNECT', {}]) self.callHooks([None, 'PYLINK_DISCONNECT', {}])