aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-04 16:37:31 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-04 16:37:31 +0200
commitef2b4d9a014b6b4bbd7967976f7e586dc3a620ad (patch)
treed7614409467ede00b69aea359e490735b6e4ca89
parent4471e0c6cdba55e554e5c4ae4cd620afea2dc1f8 (diff)
downloadxK-ef2b4d9a014b6b4bbd7967976f7e586dc3a620ad.tar.gz
xK-ef2b4d9a014b6b4bbd7967976f7e586dc3a620ad.tar.xz
xK-ef2b4d9a014b6b4bbd7967976f7e586dc3a620ad.zip
degesch: flush I/O buffers on disconnect
Discovered thanks to weercd.
-rw-r--r--degesch.c3
1 files changed, 3 insertions, 0 deletions
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);