From 6044e6f44ffb94c62ff33dcd3b7981f3667ddd05 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 16 Jul 2017 19:55:56 +0300 Subject: Router: joint must be added to engine's joint list in the engine thread. --- src/nxt_router.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/nxt_router.c') 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); -- cgit