mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
finalizing with rc == 0 in unbuffered proxy mode caused nginx to wait
for another send_timeout before actually closing client's connection if client timed out while still talking to upstream server patch by Maxim Dounin
This commit is contained in:
parent
b0b6bcedfc
commit
a3741fb24d
@ -2317,7 +2317,7 @@ ngx_http_upstream_process_non_buffered_downstream(ngx_http_request_t *r)
|
|||||||
if (wev->timedout) {
|
if (wev->timedout) {
|
||||||
c->timedout = 1;
|
c->timedout = 1;
|
||||||
ngx_connection_error(c, NGX_ETIMEDOUT, "client timed out");
|
ngx_connection_error(c, NGX_ETIMEDOUT, "client timed out");
|
||||||
ngx_http_upstream_finalize_request(r, u, 0);
|
ngx_http_upstream_finalize_request(r, u, NGX_HTTP_REQUEST_TIME_OUT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3013,6 +3013,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (u->header_sent
|
if (u->header_sent
|
||||||
|
&& rc != NGX_HTTP_REQUEST_TIME_OUT
|
||||||
&& (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE))
|
&& (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE))
|
||||||
{
|
{
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user