From 5a756647ff7c65d1997bda9bcac4bf588149139a Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Tue, 25 Jul 2017 16:18:31 +0300 Subject: Using engine task to avoid racing condition. --- src/nxt_router.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/nxt_router.c b/src/nxt_router.c index 0cee933f..5116234c 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1540,7 +1540,12 @@ nxt_router_listen_socket_update(nxt_task_t *task, void *obj, void *data) nxt_event_engine_post(job->tmcf->engine, &job->work); - nxt_router_conf_release(task, old); + /* + * The task is allocated from configuration temporary + * memory pool so it can be freed after engine post operation. + */ + + nxt_router_conf_release(&engine->task, old); } -- cgit