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_h1proto.c | |
parent | f2bab1b1be658e3456aa1cec84a1879d4b01577e (diff) | |
download | unit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.gz unit-ce26dd729e6842c9ec8cc83bf091167e4c50a1ec.tar.bz2 |
Implemented basic statistics API.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_h1proto.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c index 1473aaa0..852b4866 100644 --- a/src/nxt_h1proto.c +++ b/src/nxt_h1proto.c @@ -478,7 +478,7 @@ nxt_h1p_conn_request_init(nxt_task_t *task, void *obj, void *data) nxt_debug(task, "h1p conn request init"); - nxt_queue_remove(&c->link); + nxt_conn_active(task->thread->engine, c); r = nxt_http_request_create(task); @@ -1739,7 +1739,7 @@ nxt_h1p_conn_close(nxt_task_t *task, void *obj, void *data) nxt_debug(task, "h1p conn close"); - nxt_queue_remove(&c->link); + nxt_conn_active(task->thread->engine, c); nxt_h1p_shutdown(task, c); } @@ -1754,7 +1754,7 @@ nxt_h1p_conn_error(nxt_task_t *task, void *obj, void *data) nxt_debug(task, "h1p conn error"); - nxt_queue_remove(&c->link); + nxt_conn_active(task->thread->engine, c); nxt_h1p_shutdown(task, c); } @@ -1801,7 +1801,8 @@ nxt_h1p_keepalive(nxt_task_t *task, nxt_h1proto_t *h1p, nxt_conn_t *c) c->sent = 0; engine = task->thread->engine; - nxt_queue_insert_head(&engine->idle_connections, &c->link); + + nxt_conn_idle(engine, c); if (in == NULL) { c->read_state = &nxt_h1p_keepalive_state; @@ -1855,7 +1856,7 @@ nxt_h1p_idle_close(nxt_task_t *task, void *obj, void *data) nxt_debug(task, "h1p idle close"); - nxt_queue_remove(&c->link); + nxt_conn_active(task->thread->engine, c); nxt_h1p_idle_response(task, c); } @@ -1874,7 +1875,7 @@ nxt_h1p_idle_timeout(nxt_task_t *task, void *obj, void *data) c = nxt_read_timer_conn(timer); c->block_read = 1; - nxt_queue_remove(&c->link); + nxt_conn_active(task->thread->engine, c); nxt_h1p_idle_response(task, c); } |