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

Irc: refuse to queue send data if aborted is set

This commit is contained in:
James Lu 2017-05-07 13:46:25 -07:00
parent de67fe0d37
commit 15ed251ed7

View File

@ -510,6 +510,9 @@ class Irc(utils.DeprecatedAttributesObject):
def send(self, data, queue=True):
"""send() wrapper with optional queueing support."""
if self.aborted.is_set():
log.debug('(%s) refusing to queue data %r as self.aborted is set', self.name, data)
return
if queue:
# XXX: we don't really know how to handle blocking queues yet, so
# it's better to not expose that yet.