From: Stephan Bosch Date: Tue, 17 Oct 2017 01:19:19 +0000 (+0200) Subject: doveadm-server: http: Fixed lingering connections after the request is sent. X-Git-Tag: 2.3.0.rc1~818 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20939b554cc042df3bac67b88356c04e7a4803ab;p=thirdparty%2Fdovecot%2Fcore.git doveadm-server: http: Fixed lingering connections after the request is sent. Turns out conn->http_client is already NULL while doveadm_http_server_connection_destroy() is called. This is because http_server_connection_unref() sets it to NULL; Fixed by removing useless HTTP connection reference. --- diff --git a/src/doveadm/client-connection-http.c b/src/doveadm/client-connection-http.c index 9dbbb5b972..52089a8970 100644 --- a/src/doveadm/client-connection-http.c +++ b/src/doveadm/client-connection-http.c @@ -184,7 +184,6 @@ doveadm_http_server_request_destroy(struct client_connection_http *conn) http_server_request_unref(&(conn->http_server_request)); http_server_switch_ioloop(doveadm_http_server); - http_server_connection_unref(&(conn->http_client)); } static void doveadm_http_server_json_error(void *context, const char *error) @@ -714,7 +713,6 @@ doveadm_http_server_handle_request(void *context, struct http_server_request *re conn->http_request = http_server_request_get(req); struct doveadm_http_server_mount *ep = NULL; - http_server_connection_ref(conn->http_client); http_server_request_set_destroy_callback(req, doveadm_http_server_request_destroy, conn); http_server_request_ref(conn->http_server_request);