summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_conn.c')
-rw-r--r--src/nxt_conn.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nxt_conn.c b/src/nxt_conn.c
index 9d30fcfd..854181ca 100644
--- a/src/nxt_conn.c
+++ b/src/nxt_conn.c
@@ -96,9 +96,13 @@ nxt_conn_create(nxt_mp_t *mp, nxt_task_t *task)
void
nxt_conn_free(nxt_task_t *task, nxt_conn_t *c)
{
+ nxt_mp_t *mp;
+
task->thread->engine->connections--;
- nxt_mp_release(c->mem_pool, c);
+ mp = c->mem_pool;
+ nxt_mp_free(mp, c);
+ nxt_mp_release(mp);
}