]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-client-connection - Always abort all commands upon smtp_client_connect...
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 22 Apr 2021 10:36:18 +0000 (12:36 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 21 May 2021 20:20:48 +0000 (20:20 +0000)
Before, these would get a disconnect failure, which makes no sense when the
client is causing the disconnect.

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

index ffa0f90e0da9980b6cad500159dc439f97f7c2d1..3dbbb94bd7887ff8632a2f547dabd9a0271ebbca 100644 (file)
@@ -1334,7 +1334,6 @@ static void smtp_client_connection_destroy(struct connection *_conn)
                break;
        case CONNECTION_DISCONNECT_DEINIT:
                e_debug(conn->event, "Connection deinit");
-               smtp_client_connection_commands_abort(conn);
                smtp_client_connection_close(&conn);
                break;
        case CONNECTION_DISCONNECT_CONNECT_TIMEOUT:
@@ -2206,6 +2205,7 @@ void smtp_client_connection_close(struct smtp_client_connection **_conn)
        conn->closed = TRUE;
 
        smtp_client_connection_transactions_abort(conn);
+       smtp_client_connection_commands_abort(conn);
        smtp_client_connection_disconnect(conn);
 
        /* could have been created while already disconnected */