From 0c8b1a4f74c256caa134770586c846c3fefffef2 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 21 Feb 2017 21:27:57 +0900 Subject: [PATCH] nghttpx: Fix bug that send_reply does not participate graceful shutdown --- src/shrpx_https_upstream.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shrpx_https_upstream.cc b/src/shrpx_https_upstream.cc index 2f0bbf0b..e97a698e 100644 --- a/src/shrpx_https_upstream.cc +++ b/src/shrpx_https_upstream.cc @@ -878,7 +878,7 @@ int HttpsUpstream::send_reply(Downstream *downstream, const uint8_t *body, auto worker = handler_->get_worker(); - if (httpconf.max_requests <= num_requests_ && + if (httpconf.max_requests <= num_requests_ || worker->get_graceful_shutdown()) { resp.fs.add_header_token(StringRef::from_lit("connection"), StringRef::from_lit("close"), false,