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: