Mercurial > hg > nginx
diff src/stream/ngx_stream_handler.c @ 6669:164a0824ce20
Stream: the $session_time variable.
The variable keeps time spent on processing the stream session.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 26 Aug 2016 15:33:04 +0300 |
parents | c70b7f4537e1 |
children | 38143d1abdec |
line wrap: on
line diff
--- a/src/stream/ngx_stream_handler.c +++ b/src/stream/ngx_stream_handler.c @@ -28,6 +28,7 @@ ngx_stream_init_connection(ngx_connectio size_t len; ngx_int_t rc; ngx_uint_t i; + ngx_time_t *tp; struct sockaddr *sa; ngx_stream_port_t *port; struct sockaddr_in *sin; @@ -158,6 +159,10 @@ ngx_stream_init_connection(ngx_connectio return; } + tp = ngx_timeofday(); + s->start_sec = tp->sec; + s->start_msec = tp->msec; + if (cmcf->limit_conn_handler) { rc = cmcf->limit_conn_handler(s);