diff options
| author | Valentin Bartenev <vbart@nginx.com> | 2016-07-19 20:22:44 +0300 |
|---|---|---|
| committer | Valentin Bartenev <vbart@nginx.com> | 2016-07-19 20:22:44 +0300 |
| commit | b034effaf5bdc28a0fff25fd2f24eb3fb84a3b56 (patch) | |
| tree | 81c25c87819daf31bc992b3548288d3d64cb08fc /src | |
| parent | 8c1a6ae2ad4612f8e2365b0c2568223ae49dbf33 (diff) | |
| download | nginx-b034effaf5bdc28a0fff25fd2f24eb3fb84a3b56.tar.gz nginx-b034effaf5bdc28a0fff25fd2f24eb3fb84a3b56.tar.bz2 | |
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 (limited to 'src')
| -rw-r--r-- | src/http/v2/ngx_http_v2_filter_module.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c index 8b9153801..09ce3f65e 100644 --- a/src/http/v2/ngx_http_v2_filter_module.c +++ b/src/http/v2/ngx_http_v2_filter_module.c @@ -1317,18 +1317,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); } |
