Skip to content

Commit

Permalink
lib-http: Fix to earlier http_client_connection_unref() change 1dead6
Browse files Browse the repository at this point in the history
Patch by Stephan Bosch
  • Loading branch information
sirainen committed Feb 22, 2016
1 parent 17bfcf5 commit f1a9b58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib-http/http-client-connection.c
Expand Up @@ -571,13 +571,15 @@ http_client_connection_return_response(struct http_client_request *req,
conn->in_req_callback = TRUE;
http_client_connection_ref(conn);
retrying = !http_client_request_callback(req, response);
if (!http_client_connection_unref(&req->conn)) {
if (!http_client_connection_unref(&conn)) {
/* the callback managed to get this connection destroyed */
req->conn = NULL;
if (!retrying)
http_client_request_finish(req);
http_client_request_unref(&req);
return FALSE;
}
conn = req->conn;
conn->in_req_callback = FALSE;

if (retrying) {
Expand Down

0 comments on commit f1a9b58

Please sign in to comment.