mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +01:00
Set Irc.aborted earlier in the disconnect loop
This prevents plugins from getting really confused as we remove things.
This commit is contained in:
parent
0d5afd266f
commit
a0a295f7d2
@ -390,6 +390,9 @@ class Irc(utils.DeprecatedAttributesObject):
|
||||
log.debug('(%s) disconnect: Clearing self.connected state.', self.name)
|
||||
self.connected.clear()
|
||||
|
||||
log.debug('(%s) disconnect: Setting self.aborted to True.', self.name)
|
||||
self.aborted.set()
|
||||
|
||||
log.debug('(%s) Removing channel logging handlers due to disconnect.', self.name)
|
||||
while self.loghandlers:
|
||||
log.removeHandler(self.loghandlers.pop())
|
||||
@ -412,9 +415,6 @@ class Irc(utils.DeprecatedAttributesObject):
|
||||
log.debug('(%s) Canceling pingTimer at %s due to disconnect() call', self.name, time.time())
|
||||
self.pingTimer.cancel()
|
||||
|
||||
log.debug('(%s) disconnect: Setting self.aborted to True.', self.name)
|
||||
self.aborted.set()
|
||||
|
||||
# Internal hook signifying that a network has disconnected.
|
||||
self.callHooks([None, 'PYLINK_DISCONNECT', {'was_successful': was_successful}])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user