From cb44fd2f888be7da34b5d3db2f4d3e88b989f0fb Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 22 Sep 2015 01:05:09 +0300 Subject: [PATCH] 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. --- src/lib-http/http-client-request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.47.3