From c5d791d0c4e4949ade77b6b5cafb7199a322ff79 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 13 Jul 2017 16:48:28 +0300 Subject: [PATCH] Router: restoring listening sockets of the previous configuration. --- src/nxt_router.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nxt_router.c b/src/nxt_router.c index 48fce3d3..ab9bcf82 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -382,6 +382,7 @@ static void nxt_router_conf_error(nxt_task_t *task, nxt_router_temp_conf_t *tmcf) { nxt_socket_t s; + nxt_router_t *router; nxt_queue_link_t *qlk; nxt_socket_conf_t *skcf; @@ -399,6 +400,11 @@ nxt_router_conf_error(nxt_task_t *task, nxt_router_temp_conf_t *tmcf) nxt_free(skcf->socket); } + router = tmcf->conf->router; + + nxt_queue_add(&router->sockets, &tmcf->keeping); + nxt_queue_add(&router->sockets, &tmcf->deleting); + // TODO: new engines and threads nxt_mp_destroy(tmcf->conf->mem_pool);