diff src/http/ngx_http_request.h @ 9307:3c71158f5a34 default tip

Keepalive connections now respect lingering_timeout on shutdown. During graceful shutdown keepalive connections are now closed only after at least lingering_timeout of inactivity. To do so, c->idle is only set on keepalive connections after lingering_timeout expires. This ensures that the connection close race will less likely result in connections being reset when a client sends a request at the same time when the connection is closed by ngx_close_idle_connections() during graceful shutdown.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 31 Jul 2024 17:50:58 +0300
parents e46e1ea89ccd
children
line wrap: on
line diff
--- a/src/http/ngx_http_request.h
+++ b/src/http/ngx_http_request.h
@@ -332,6 +332,8 @@ typedef struct {
 
     ngx_chain_t                      *free;
 
+    ngx_msec_t                        keepalive_timeout;
+
     unsigned                          ssl:1;
     unsigned                          proxy_protocol:1;
 } ngx_http_connection_t;