Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: always handle streams in error state.

Valentin Bartenev
July 19, 2016 01:28PM
details: http://hg.nginx.org/nginx/rev/a2b310a8b2af
branches:
changeset: 6638:a2b310a8b2af
user: Valentin Bartenev <vbart@nginx.com>
date: Tue Jul 19 20:22:44 2016 +0300
description:
HTTP/2: always handle streams in error state.

Previously, a stream could be closed by timeout if it was canceled
while its send window was exhausted.

diffstat:

src/http/v2/ngx_http_v2_filter_module.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)

diffs (30 lines):

diff -r 699e409a3e0c -r a2b310a8b2af src/http/v2/ngx_http_v2_filter_module.c
--- a/src/http/v2/ngx_http_v2_filter_module.c Tue Jul 19 20:22:44 2016 +0300
+++ b/src/http/v2/ngx_http_v2_filter_module.c Tue Jul 19 20:22:44 2016 +0300
@@ -1294,18 +1294,20 @@ static ngx_inline void
ngx_http_v2_handle_stream(ngx_http_v2_connection_t *h2c,
ngx_http_v2_stream_t *stream)
{
- ngx_event_t *wev;
+ ngx_connection_t *fc;

- if (stream->handled || stream->blocked || stream->exhausted) {
+ if (stream->handled || stream->blocked) {
return;
}

- wev = stream->request->connection->write;
+ fc = stream->request->connection;

- if (!wev->delayed) {
- stream->handled = 1;
- ngx_queue_insert_tail(&h2c->posted, &stream->queue);
+ if (!fc->error && (stream->exhausted || fc->write->delayed)) {
+ return;
}
+
+ stream->handled = 1;
+ ngx_queue_insert_tail(&h2c->posted, &stream->queue);
}



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

[nginx] HTTP/2: always handle streams in error state.

Valentin Bartenev 388 July 19, 2016 01:28PM



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

Online Users

Guests: 277
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