]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Finish client ostream at disconnect
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 7 Jun 2018 11:20:33 +0000 (14:20 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 13 Jun 2018 06:18:30 +0000 (09:18 +0300)
With IMAP COMPRESS this sends the EOF marker, indicating cleanly closed
connection.

src/imap/imap-client.c

index 37c77a9fa8f9d9ab7f95d604e6403b6c19d483b3..baa468374daf29a893ce88ac8c89a006d82eb98d 100644 (file)
@@ -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);