comparison src/event/ngx_event_connect.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 8b68d50090e4
children 32b0ba4855a6
comparison
equal deleted inserted replaced
7819:3674d5b7174e 7820:fdc3d40979b0
191 191
192 pc->connection = c; 192 pc->connection = c;
193 193
194 c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1); 194 c->number = ngx_atomic_fetch_add(ngx_connection_counter, 1);
195 195
196 c->start_time = ngx_current_msec;
197
196 if (ngx_add_conn) { 198 if (ngx_add_conn) {
197 if (ngx_add_conn(c) == NGX_ERROR) { 199 if (ngx_add_conn(c) == NGX_ERROR) {
198 goto failed; 200 goto failed;
199 } 201 }
200 } 202 }