aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/v2/ngx_http_v2_filter_module.c14
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 a53cae13f..4ab779121 100644
--- a/src/http/v2/ngx_http_v2_filter_module.c
+++ b/src/http/v2/ngx_http_v2_filter_module.c
@@ -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);
}