diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-07-16 19:55:56 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-07-16 19:55:56 +0300 |
commit | 6044e6f44ffb94c62ff33dcd3b7981f3667ddd05 (patch) | |
tree | d3cfaff65ee406adc3b6d9da83595c301e3411da | |
parent | ca3b1b898a759441664e75ea0d1885e36b9defac (diff) | |
download | unit-6044e6f44ffb94c62ff33dcd3b7981f3667ddd05.tar.gz unit-6044e6f44ffb94c62ff33dcd3b7981f3667ddd05.tar.bz2 |
Router: joint must be added to engine's joint list in the
engine thread.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_router.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 9500a9fb..d95ee003 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1067,8 +1067,6 @@ nxt_router_engine_joints_create(nxt_router_temp_conf_t *tmcf, joint->socket_conf = skcf; joint->engine = recf->engine; - - nxt_queue_insert_tail(&joint->engine->joints, &joint->link); } return NXT_OK; @@ -1304,6 +1302,8 @@ nxt_router_listen_socket_create(nxt_task_t *task, void *obj, void *data) ls = &joint->socket_conf->listen; + nxt_queue_insert_tail(&task->thread->engine->joints, &joint->link); + listen = nxt_listen_event(task, ls); if (nxt_slow_path(listen == NULL)) { nxt_router_listen_socket_release(task, joint); @@ -1357,6 +1357,8 @@ nxt_router_listen_socket_update(nxt_task_t *task, void *obj, void *data) engine = task->thread->engine; + nxt_queue_insert_tail(&engine->joints, &joint->link); + listen = nxt_router_listen_event(&engine->listen_connections, joint->socket_conf); |