aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_upstream_keepalive_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_upstream_keepalive_module.c')
-rw-r--r--src/http/modules/ngx_http_upstream_keepalive_module.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_upstream_keepalive_module.c b/src/http/modules/ngx_http_upstream_keepalive_module.c
index 768881ee4..51887b4e8 100644
--- a/src/http/modules/ngx_http_upstream_keepalive_module.c
+++ b/src/http/modules/ngx_http_upstream_keepalive_module.c
@@ -302,6 +302,10 @@ ngx_http_upstream_free_keepalive_peer(ngx_peer_connection_t *pc, void *data,
goto invalid;
}
+ if (ngx_terminate || ngx_exiting) {
+ goto invalid;
+ }
+
if (ngx_handle_read_event(c->read, 0) != NGX_OK) {
goto invalid;
}