[PATCH] Nullify pc->connection in case of failure
Piotr Sikora
piotr.sikora at frickle.com
Thu Jan 19 06:40:57 UTC 2012
Hi,
attached patch fixes issue when nginx would try to close the same socket
twice in case of failure to add events on new upstream connection (first
time in ngx_event_connect_peer() and then again in
ngx_http_upstream_finalize_request()).
Best regards,
Piotr Sikora < piotr.sikora at frickle.com >
--- src/event/ngx_event_connect.c.orig Wed Nov 25 18:03:59 2009
+++ src/event/ngx_event_connect.c Thu Jan 19 06:29:09 2012
@@ -247,6 +247,8 @@ failed:
ngx_close_socket_n " failed");
}
+ pc->connection = NULL;
+
return NGX_ERROR;
}
More information about the nginx-devel
mailing list