summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_h1proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_h1proto.c')
-rw-r--r--src/nxt_h1proto.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/nxt_h1proto.c b/src/nxt_h1proto.c
index d3340774..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);
@@ -490,7 +490,7 @@ nxt_h1p_conn_request_init(nxt_task_t *task, void *obj, void *data)
r->remote = c->remote;
#if (NXT_TLS)
- r->tls = c->u.tls;
+ r->tls = (c->u.tls != NULL);
#endif
r->task = c->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);
}