# HG changeset patch # User Valentin Bartenev # Date 1468949469 -10800 # Node ID 4f8ad0faab3cec2af0132fc29eb73fc7140d15fb # Parent 078f17b2535b9ba9ca912eb072c7f08b811c158b 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. diff -r 078f17b2535b -r 4f8ad0faab3c src/http/v2/ngx_http_v2.c --- a/src/http/v2/ngx_http_v2.c Tue Jul 19 20:30:21 2016 +0300 +++ b/src/http/v2/ngx_http_v2.c Tue Jul 19 20:31:09 2016 +0300 @@ -549,7 +549,7 @@ c->tcp_nodelay = NGX_TCP_NODELAY_SET; } - if (cl) { + if (!wev->ready) { ngx_add_timer(wev, clcf->send_timeout); } else {