summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_router.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c
index 2bbe87b8..c597863e 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -3285,17 +3285,17 @@ nxt_router_listen_socket_close(nxt_task_t *task, void *obj, void *data)
joint = lev->socket.data;
lev->socket.data = NULL;
+ /* 'task' refers to lev->task and we cannot use after nxt_free() */
+ task = &task->thread->engine->task;
+
+ nxt_router_listen_socket_release(task, joint->socket_conf);
+
job = joint->close_job;
job->work.next = NULL;
job->work.handler = nxt_router_conf_wait;
nxt_event_engine_post(job->tmcf->engine, &job->work);
- /* 'task' refers to lev->task and we cannot use after nxt_free() */
- task = &task->thread->engine->task;
-
- nxt_router_listen_socket_release(task, joint->socket_conf);
-
nxt_router_listen_event_release(task, lev, joint);
}