]> git.kaiwu.me - nginx.git/commitdiff
HTTP/2: always send GOAWAY while worker is shutting down.
authorValentin Bartenev <vbart@nginx.com>
Tue, 19 Jul 2016 17:22:44 +0000 (20:22 +0300)
committerValentin Bartenev <vbart@nginx.com>
Tue, 19 Jul 2016 17:22:44 +0000 (20:22 +0300)
Previously, if the worker process exited, GOAWAY was sent to connections in
idle state, but connections with active streams were closed without GOAWAY.

src/http/v2/ngx_http_v2.c

index 19e5f3a0975fa2ae66a1c99948b21cefdc18275e..7e4736b60936714d8458c77415de384db7f590de 100644 (file)
@@ -615,7 +615,7 @@ ngx_http_v2_handle_connection(ngx_http_v2_connection_t *h2c)
     }
 
     if (ngx_terminate || ngx_exiting) {
-        ngx_http_close_connection(c);
+        ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_NO_ERROR);
         return;
     }