Skip to content

Commit

Permalink
HTTP/2: fixed send timer handling.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
VBart committed Jul 19, 2016
1 parent ce6eb33 commit 3b2f54b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http/v2/ngx_http_v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3b2f54b

Please sign in to comment.