a non-active client connection must not closed after send timeout
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index f9d2482..780528a 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c
@@ -1700,7 +1700,7 @@ } } - if (downstream->write->active) { + if (downstream->write->active && !downstream->write->ready) { ngx_add_timer(downstream->write, clcf->send_timeout); } else if (downstream->write->timer_set) { @@ -1712,7 +1712,7 @@ return; } - if (upstream->read->active) { + if (upstream->read->active && !upstream->read->ready) { ngx_add_timer(upstream->read, u->conf->read_timeout); } else if (upstream->read->timer_set) {