[nginx] HTTP/2: always send GOAWAY while worker is shutting down.

Maxim Dounin mdounin at mdounin.ru
Tue Oct 18 14:48:15 UTC 2016


details:   http://hg.nginx.org/nginx/rev/ee43fa9aff66
branches:  stable-1.10
changeset: 6759:ee43fa9aff66
user:      Valentin Bartenev <vbart at nginx.com>
date:      Tue Jul 19 20:22:44 2016 +0300
description:
HTTP/2: always send GOAWAY while worker is shutting down.

Previously, if the worker process exited, GOAWAY was sent to connections in
idle state, but connections with active streams were closed without GOAWAY.

diffstat:

 src/http/v2/ngx_http_v2.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -615,7 +615,7 @@ ngx_http_v2_handle_connection(ngx_http_v
     }
 
     if (ngx_terminate || ngx_exiting) {
-        ngx_http_close_connection(c);
+        ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_NO_ERROR);
         return;
     }
 



More information about the nginx-devel mailing list