Mercurial > dovecot > core-2.2
changeset 17935:6c341dcec32a
lib-http: client: Fixed assert crash occurring when DNS lookup fails immediately during request submission.
In that situation, the request was not dropped from the queue immediately, triggering the assert crash.
author | Stephan Bosch <stephan@rename-it.nl> |
---|---|
date | Fri, 10 Oct 2014 00:46:15 +0300 |
parents | 86b1860c8deb |
children | 4a401e9853ee |
files | src/lib-http/http-client-request.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/http-client-request.c Thu Oct 09 21:23:08 2014 +0300 +++ b/src/lib-http/http-client-request.c Fri Oct 10 00:46:15 2014 +0300 @@ -900,6 +900,9 @@ if (req->state >= HTTP_REQUEST_STATE_FINISHED) return; + if (req->queue != NULL) + http_client_queue_drop_request(req->queue, req); + if (!req->submitted) { /* we're still in http_client_request_submit(). delay reporting the error, so the caller doesn't have to handle @@ -910,8 +913,6 @@ http_client_host_delay_request_error(req->host, req); } else { http_client_request_send_error(req, status, error); - if (req->queue != NULL) - http_client_queue_drop_request(req->queue, req); http_client_request_unref(&req); } }