From: Timo Sirainen Date: Mon, 21 Sep 2015 22:05:09 +0000 (+0300) Subject: lib-http: Optimized http_client_request_send_payload() fix X-Git-Tag: 2.2.19.rc1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb44fd2f888be7da34b5d3db2f4d3e88b989f0fb;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Optimized http_client_request_send_payload() fix Badly copy&pasted my original fix, instead of noticing that Stephan's fix was slightly different. Probably shouldn't have made actual difference other than for performance. --- diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index 98a6c70ba1..8345d79c2d 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -981,7 +981,7 @@ http_client_request_send_error(struct http_client_request *req, if (!sending && req->payload_input != NULL) i_stream_unref(&req->payload_input); } - if (req->client->ioloop != NULL) + if (req->payload_wait && req->client->ioloop != NULL) io_loop_stop(req->client->ioloop); } @@ -1041,7 +1041,7 @@ void http_client_request_abort(struct http_client_request **_req) if (req->queue != NULL) http_client_queue_drop_request(req->queue, req); - if (req->client->ioloop != NULL) + if (req->payload_wait && req->client->ioloop != NULL) io_loop_stop(req->client->ioloop); http_client_request_unref(_req); }