mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 20:22:45 +01:00
classes.Irc: only allow one shutdown sequence at a time (#152)
This commit is contained in:
parent
989f1f4f64
commit
cf2fcf9263
@ -227,7 +227,11 @@ class Irc():
|
|||||||
# exception, meaning we've disconnected!
|
# exception, meaning we've disconnected!
|
||||||
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))
|
||||||
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.
|
# Internal hook signifying that a network has disconnected.
|
||||||
self.callHooks([None, 'PYLINK_DISCONNECT', {}])
|
self.callHooks([None, 'PYLINK_DISCONNECT', {}])
|
||||||
|
Loading…
Reference in New Issue
Block a user