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:
parent
de67fe0d37
commit
15ed251ed7
@ -510,6 +510,9 @@ class Irc(utils.DeprecatedAttributesObject):
|
|||||||
|
|
||||||
def send(self, data, queue=True):
|
def send(self, data, queue=True):
|
||||||
"""send() wrapper with optional queueing support."""
|
"""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:
|
if queue:
|
||||||
# XXX: we don't really know how to handle blocking queues yet, so
|
# XXX: we don't really know how to handle blocking queues yet, so
|
||||||
# it's better to not expose that yet.
|
# it's better to not expose that yet.
|
||||||
|
Loading…
Reference in New Issue
Block a user