3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-11 20:52:42 +01:00

Irc: break out of processQueue as soon as self.aborted is set

This commit is contained in:
James Lu 2017-03-24 18:40:02 -07:00
parent af3b350498
commit e3c0bf6a1b

View File

@ -179,7 +179,8 @@ class Irc(utils.DeprecatedAttributesObject):
data = self.queue.popleft() data = self.queue.popleft()
self._send(data) self._send(data)
throttle_time = self.serverdata.get('throttle_time', 0.01) throttle_time = self.serverdata.get('throttle_time', 0.01)
time.sleep(throttle_time) self.aborted.wait(throttle_time)
log.debug('(%s) Stopping queue thread as aborted is set', self.name)
def connect(self): def connect(self):
""" """