Mercurial > dovecot > core-2.2
changeset 17984:bce536c20d32
lib-http: client: Clear req->conn when request is finished.
This prevents a spurious assert failure.
author | Stephan Bosch <stephan@rename-it.nl> |
---|---|
date | Thu, 23 Oct 2014 05:55:51 +0300 |
parents | 575dcd85b4be |
children | e479bce0633b |
files | src/lib-http/http-client-connection.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/http-client-connection.c Thu Oct 23 05:04:37 2014 +0300 +++ b/src/lib-http/http-client-connection.c Thu Oct 23 05:55:51 2014 +0300 @@ -438,6 +438,7 @@ the payload. make sure here that it's switched back. */ net_set_nonblock(conn->conn.fd_in, TRUE); + req->conn = NULL; conn->incoming_payload = NULL; conn->pending_request = NULL; http_client_request_finish(&req); @@ -495,6 +496,7 @@ retrying = !http_client_request_callback(req, response); http_client_connection_unref(&conn); if (conn == NULL) { + req->conn = NULL; /* the callback managed to get this connection destroyed */ if (!retrying) http_client_request_finish(&req); @@ -531,6 +533,7 @@ http_client_payload_finished(conn); } } else { + req->conn = NULL; http_client_request_finish(&req); http_client_request_unref(&req); }