diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-07-25 16:18:31 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-07-25 16:18:31 +0300 |
commit | 5a756647ff7c65d1997bda9bcac4bf588149139a (patch) | |
tree | 88247e6a1485730be00841937938e5eb3808e941 /src/nxt_router.c | |
parent | 316c77a9de638c54e2574c205276917ff442d06e (diff) | |
download | unit-5a756647ff7c65d1997bda9bcac4bf588149139a.tar.gz unit-5a756647ff7c65d1997bda9bcac4bf588149139a.tar.bz2 |
Using engine task to avoid racing condition.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_router.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |