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

classes.Irc: only allow one shutdown sequence at a time (#152)

This commit is contained in:
James Lu 2016-01-09 20:23:23 -08:00
parent 989f1f4f64
commit cf2fcf9263

View File

@ -227,6 +227,10 @@ class Irc():
# exception, meaning we've disconnected!
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()
# Internal hook signifying that a network has disconnected.