From 0d5afd266fa147753e46eb10b054bda4d4b479ac Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 3 Aug 2017 10:15:29 -0700 Subject: [PATCH] Irc: stop extraneous queue threads when removing from world.networkobjects --- classes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classes.py b/classes.py index 0c033b4..79074c5 100644 --- a/classes.py +++ b/classes.py @@ -187,6 +187,9 @@ class Irc(utils.DeprecatedAttributesObject): if data is None: log.debug('(%s) Stopping queue thread due to getting None as item', self.name) break + elif self not in world.networkobjects.values(): + log.debug('(%s) Stopping stale queue thread; no longer matches world.networkobjects', self.name) + break elif data: self._send(data) else: