From 09015dd302ce43e2d5c904a280a0137dfe0c6470 Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 4 Jun 2019 14:38:08 +0100 Subject: [PATCH] Change signals.py to subvert write throttling when sending QUIT --- modules/signals.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/signals.py b/modules/signals.py index 522179c5..9e01ac47 100644 --- a/modules/signals.py +++ b/modules/signals.py @@ -23,9 +23,12 @@ class Module(ModuleManager.BaseModule): for server in self.bot.servers.values(): if server.connected: server.socket.clear_send_buffer() - line = server.send_quit("Shutting down") - server.send_enabled = False + + line = utils.irc.protocol.quit("Shutting down") line.on_send(self._make_hook(server)) + server.send(line, immediate=True) + + server.send_enabled = False written = True if not written: