From 75869897630aadcdfdc3478f41a90453b1ae28ed Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 31 Mar 2018 11:53:01 -0700 Subject: [PATCH] classes: really quash duplicate disconnect calls as much as possible --- classes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes.py b/classes.py index 9c070d1..58df811 100644 --- a/classes.py +++ b/classes.py @@ -1609,6 +1609,9 @@ class IRCNetwork(PyLinkNetworkCoreWithUtils): def disconnect(self): """Handle disconnects from the remote server.""" + if self._aborted.is_set(): + return + self._pre_disconnect() if self._socket is not None: