Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2_filter_module.c @ 6638:a2b310a8b2af
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.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 19 Jul 2016 20:22:44 +0300 |
parents | 699e409a3e0c |
children | 45d553812055 |
comparison
equal
deleted
inserted
replaced
6637:699e409a3e0c | 6638:a2b310a8b2af |
---|---|
1292 | 1292 |
1293 static ngx_inline void | 1293 static ngx_inline void |
1294 ngx_http_v2_handle_stream(ngx_http_v2_connection_t *h2c, | 1294 ngx_http_v2_handle_stream(ngx_http_v2_connection_t *h2c, |
1295 ngx_http_v2_stream_t *stream) | 1295 ngx_http_v2_stream_t *stream) |
1296 { | 1296 { |
1297 ngx_event_t *wev; | 1297 ngx_connection_t *fc; |
1298 | 1298 |
1299 if (stream->handled || stream->blocked || stream->exhausted) { | 1299 if (stream->handled || stream->blocked) { |
1300 return; | 1300 return; |
1301 } | 1301 } |
1302 | 1302 |
1303 wev = stream->request->connection->write; | 1303 fc = stream->request->connection; |
1304 | 1304 |
1305 if (!wev->delayed) { | 1305 if (!fc->error && (stream->exhausted || fc->write->delayed)) { |
1306 stream->handled = 1; | 1306 return; |
1307 ngx_queue_insert_tail(&h2c->posted, &stream->queue); | 1307 } |
1308 } | 1308 |
1309 stream->handled = 1; | |
1310 ngx_queue_insert_tail(&h2c->posted, &stream->queue); | |
1309 } | 1311 } |
1310 | 1312 |
1311 | 1313 |
1312 static void | 1314 static void |
1313 ngx_http_v2_filter_cleanup(void *data) | 1315 ngx_http_v2_filter_cleanup(void *data) |