3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-24 03:04:05 +01:00

Irc: stop extraneous queue threads when removing from world.networkobjects

This commit is contained in:
James Lu 2017-08-03 10:15:29 -07:00
parent d734fc3280
commit 0d5afd266f

View File

@ -187,6 +187,9 @@ class Irc(utils.DeprecatedAttributesObject):
if data is None: if data is None:
log.debug('(%s) Stopping queue thread due to getting None as item', self.name) log.debug('(%s) Stopping queue thread due to getting None as item', self.name)
break 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: elif data:
self._send(data) self._send(data)
else: else: