From 6e8850b34d04953c20f163cae07d7c1f2a3e9f27 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 7 Jun 2018 14:20:33 +0300 Subject: [PATCH] imap: Finish client ostream at disconnect With IMAP COMPRESS this sends the EOF marker, indicating cleanly closed connection. --- src/imap/imap-client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index 37c77a9fa8..baa468374d 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -525,6 +525,8 @@ void client_disconnect(struct client *client, const char *reason) client->disconnected = TRUE; client->disconnect_reason = p_strdup(client->pool, reason); + /* Finish the ostream. With IMAP COMPRESS this sends the EOF marker. */ + (void)o_stream_finish(client->output); o_stream_uncork(client->output); i_stream_close(client->input); -- 2.47.3