diff options
author | Valentin Bartenev <vbart@nginx.com> | 2022-08-29 14:27:09 +0800 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2022-08-29 14:27:09 +0800 |
commit | ce26dd729e6842c9ec8cc83bf091167e4c50a1ec (patch) | |
tree | d215198f765faeefd46253bd118e8d058d31fd1e /src/nxt_conn_accept.c | |
parent | f2bab1b1be658e3456aa1cec84a1879d4b01577e (diff) | |
download | unit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.gz unit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.bz2 |
Implemented basic statistics API.
Diffstat (limited to 'src/nxt_conn_accept.c')
-rw-r--r-- | src/nxt_conn_accept.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nxt_conn_accept.c b/src/nxt_conn_accept.c index 77c44c58..720c7b64 100644 --- a/src/nxt_conn_accept.c +++ b/src/nxt_conn_accept.c @@ -187,7 +187,8 @@ nxt_conn_io_accept(nxt_task_t *task, void *obj, void *data) void nxt_conn_accept(nxt_task_t *task, nxt_listen_event_t *lev, nxt_conn_t *c) { - nxt_conn_t *next; + nxt_conn_t *next; + nxt_event_engine_t *engine; nxt_sockaddr_text(c->remote); @@ -195,7 +196,11 @@ nxt_conn_accept(nxt_task_t *task, nxt_listen_event_t *lev, nxt_conn_t *c) (size_t) c->remote->address_length, nxt_sockaddr_address(c->remote)); - nxt_queue_insert_head(&task->thread->engine->idle_connections, &c->link); + engine = task->thread->engine; + + engine->accepted_conns_cnt++; + + nxt_conn_idle(engine, c); c->listen = lev; lev->count++; |