]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Abort pending requests at connection destroy rather than disconnect.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Sun, 16 Sep 2018 13:36:59 +0000 (15:36 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 21 Mar 2019 07:48:37 +0000 (07:48 +0000)
This is needed for subsequent changes.

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

index 35fe5729d55fa472c2483bde8491cdc274204d52..628f7732e3773f1fac4ec38ce19deea09481796e 100644 (file)
@@ -1767,8 +1767,6 @@ http_client_connection_disconnect(struct http_client_connection *conn)
                conn->incoming_payload = NULL;
        }
 
-       http_client_connection_abort_any_requests(conn);
-
        if (conn->http_parser != NULL)
                http_response_parser_deinit(&conn->http_parser);
 
@@ -1816,6 +1814,7 @@ bool http_client_connection_unref(struct http_client_connection **_conn)
        e_debug(conn->event, "Connection destroy");
 
        http_client_connection_disconnect(conn);
+       http_client_connection_abort_any_requests(conn);
 
        i_assert(conn->io_req_payload == NULL);
        i_assert(conn->to_requests == NULL);
@@ -1844,7 +1843,7 @@ void http_client_connection_close(struct http_client_connection **_conn)
        e_debug(conn->event, "Connection close");
 
        http_client_connection_disconnect(conn);
-
+       http_client_connection_abort_any_requests(conn);
        http_client_connection_unref(_conn);
 }