Protect access to scheduler queue with mutex

master
Nikola Forró 6 years ago
parent 2bbc4c7dd5
commit 0344fe59c9

@ -116,7 +116,8 @@ class ReplayBot(irc.bot.SingleServerIRCBot):
if int(tags['user-id']) != self.control_user:
send_response('Sorry @{0}, you are not allowed to do this'.format(tags['display-name']))
return
self.reactor.scheduler.queue.clear()
with self.reactor.mutex:
self.reactor.scheduler.queue.clear()
def _post_message(self, user, msg):
self.connection.privmsg(self.output_channel, '[{0}]: {1}'.format(user, msg))

Loading…
Cancel
Save