diff src/event/ngx_event_udp.c @ 7820:fdc3d40979b0

Introduced the "keepalive_time" directive. Similar to lingering_time, it limits total connection lifetime before keepalive is switched off. The default is 1 hour, which is close to the total maximum connection lifetime possible with default keepalive_requests and keepalive_timeout.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 08 Apr 2021 00:15:48 +0300
parents 6d4bc025c5a7
children 0f6cc8f73744 7f95010f10b7
line wrap: on
line diff
--- a/src/event/ngx_event_udp.c
+++ b/src/event/ngx_event_udp.c
@@ -363,6 +363,8 @@ ngx_event_recvmsg(ngx_event_t *ev)
 
         c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
 
+        c->start_time = ngx_current_msec;
+
 #if (NGX_STAT_STUB)
         (void) ngx_atomic_fetch_add(ngx_stat_handled, 1);
 #endif