From ef2b4d9a014b6b4bbd7967976f7e586dc3a620ad Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sat, 4 Jul 2015 16:37:31 +0200
Subject: degesch: flush I/O buffers on disconnect
Discovered thanks to weercd.
---
degesch.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/degesch.c b/degesch.c
index d5ae36a..bfd3802 100644
--- a/degesch.c
+++ b/degesch.c
@@ -3428,6 +3428,9 @@ irc_disconnect (struct server *s)
s->socket_event.closed = true;
poller_fd_reset (&s->socket_event);
+ str_reset (&s->read_buffer);
+ str_reset (&s->write_buffer);
+
// All of our timers have lost their meaning now
irc_cancel_timers (s);
--
cgit v1.2.3-70-g09d2