Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: fixed send timer handling.

Valentin Bartenev
July 19, 2016 01:38PM
details: http://hg.nginx.org/nginx/rev/e78eca6bfaf0
branches:
changeset: 6640:e78eca6bfaf0
user: Valentin Bartenev <vbart@nginx.com>
date: Tue Jul 19 20:31:09 2016 +0300
description:
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:

src/http/v2/ngx_http_v2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 82efcedb310b -r e78eca6bfaf0 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 @@ ngx_http_v2_send_output_queue(ngx_http_v
c->tcp_nodelay = NGX_TCP_NODELAY_SET;
}

- if (cl) {
+ if (!wev->ready) {
ngx_add_timer(wev, clcf->send_timeout);

} else {

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] HTTP/2: fixed send timer handling.

Valentin Bartenev 316 July 19, 2016 01:38PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 254
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready