aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/v2/ngx_http_v2.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 714707b2c..37cb9070c 100644
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -4134,6 +4134,14 @@ ngx_http_v2_handle_connection_handler(ngx_event_t *rev)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, rev->log, 0,
"http2 handle connection handler");
+ c = rev->data;
+ h2c = c->data;
+
+ if (c->error) {
+ ngx_http_v2_finalize_connection(h2c, 0);
+ return;
+ }
+
rev->handler = ngx_http_v2_read_handler;
if (rev->ready) {
@@ -4141,9 +4149,6 @@ ngx_http_v2_handle_connection_handler(ngx_event_t *rev)
return;
}
- c = rev->data;
- h2c = c->data;
-
if (h2c->last_out && ngx_http_v2_send_output_queue(h2c) == NGX_ERROR) {
ngx_http_v2_finalize_connection(h2c, 0);
return;