]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: Uncork connection after QUIT, not before
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 6 Nov 2019 12:32:57 +0000 (14:32 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 12 Nov 2019 07:30:50 +0000 (07:30 +0000)
This makes it more likely to work and without an extra TCP packet.

src/lib-smtp/smtp-client-connection.c

index 610cca0ef576c66c7ce3c90c640dcdd1870cf7b2..730fae504c1acab881ebe6a73a63ff4ae8b5af8a 100644 (file)
@@ -1693,8 +1693,8 @@ void smtp_client_connection_disconnect(struct smtp_client_connection *conn)
        if (conn->conn.output != NULL && !conn->sent_quit &&
                !conn->sending_command) {
                /* Close the connection gracefully if possible */
-               o_stream_uncork(conn->conn.output);
                o_stream_nsend_str(conn->conn.output, "QUIT\r\n");
+               o_stream_uncork(conn->conn.output);
        }
 
        if (conn->dns_lookup != NULL)