aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2016-07-19 20:31:09 +0300
committerValentin Bartenev <vbart@nginx.com>2016-07-19 20:31:09 +0300
commit3b2f54bc2ea0d9d34b3e181f1221a050824e1c1a (patch)
tree75974dd849b6ed2d22a6bd1c8e8eaaf61ff80a9d /src
parentce6eb33d15f1efd3c418ce7688ed6de3af81cae9 (diff)
downloadnginx-3b2f54bc2ea0d9d34b3e181f1221a050824e1c1a.tar.gz
nginx-3b2f54bc2ea0d9d34b3e181f1221a050824e1c1a.zip
HTTP/2: fixed send timer handling.
Checking for return value of c->send_chain() isn't sufficient since there are data can be left in the SSL buffer. Now the wew->ready flag is used instead. In particular, this fixed a connection leak in cases when all streams were closed, but there's still some data to be sent in the SSL buffer and the client forgot about the connection.
Diffstat (limited to 'src')
-rw-r--r--src/http/v2/ngx_http_v2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 959e3a6f3..0ce8bce26 100644
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -549,7 +549,7 @@ ngx_http_v2_send_output_queue(ngx_http_v2_connection_t *h2c)
c->tcp_nodelay = NGX_TCP_NODELAY_SET;
}
- if (cl) {
+ if (!wev->ready) {
ngx_add_timer(wev, clcf->send_timeout);
} else {