Mercurial > hg > nginx
comparison src/http/v2/ngx_http_v2_filter_module.c @ 6761:73e62bd2ce69 stable-1.10
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 | 9d61ecbe979e |
children | 749bcfdf097a |
comparison
equal
deleted
inserted
replaced
6760:9d61ecbe979e | 6761:73e62bd2ce69 |
---|---|
1315 | 1315 |
1316 static ngx_inline void | 1316 static ngx_inline void |
1317 ngx_http_v2_handle_stream(ngx_http_v2_connection_t *h2c, | 1317 ngx_http_v2_handle_stream(ngx_http_v2_connection_t *h2c, |
1318 ngx_http_v2_stream_t *stream) | 1318 ngx_http_v2_stream_t *stream) |
1319 { | 1319 { |
1320 ngx_event_t *wev; | 1320 ngx_connection_t *fc; |
1321 | 1321 |
1322 if (stream->handled || stream->blocked || stream->exhausted) { | 1322 if (stream->handled || stream->blocked) { |
1323 return; | 1323 return; |
1324 } | 1324 } |
1325 | 1325 |
1326 wev = stream->request->connection->write; | 1326 fc = stream->request->connection; |
1327 | 1327 |
1328 if (!wev->delayed) { | 1328 if (!fc->error && (stream->exhausted || fc->write->delayed)) { |
1329 stream->handled = 1; | 1329 return; |
1330 ngx_queue_insert_tail(&h2c->posted, &stream->queue); | 1330 } |
1331 } | 1331 |
1332 stream->handled = 1; | |
1333 ngx_queue_insert_tail(&h2c->posted, &stream->queue); | |
1332 } | 1334 } |
1333 | 1335 |
1334 | 1336 |
1335 static void | 1337 static void |
1336 ngx_http_v2_filter_cleanup(void *data) | 1338 ngx_http_v2_filter_cleanup(void *data) |