diff options
author | Igor Sysoev <igor@sysoev.ru> | 2020-03-06 18:28:54 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2020-03-06 18:28:54 +0300 |
commit | 7935ea45436ea832344cec945d39a61ae91f2a69 (patch) | |
tree | 6ae820cdaf2204331300bb967090f23b61ed4d0a /src/nxt_router.c | |
parent | 794248090a74f31cbfcf24ea8c835df2d4d21073 (diff) | |
download | unit-7935ea45436ea832344cec945d39a61ae91f2a69.tar.gz unit-7935ea45436ea832344cec945d39a61ae91f2a69.tar.bz2 |
Round robin upstream added.
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r-- | src/nxt_router.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 46a6b921..d77ffa2b 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1634,6 +1634,11 @@ nxt_router_conf_create(nxt_task_t *task, nxt_router_temp_conf_t *tmcf, tmcf->router_conf->routes = routes; } + ret = nxt_upstreams_create(task, tmcf, conf); + if (nxt_slow_path(ret != NXT_OK)) { + return ret; + } + http = nxt_conf_get_path(conf, &http_path); #if 0 if (http == NULL) { @@ -2526,6 +2531,7 @@ nxt_router_engine_joints_create(nxt_router_temp_conf_t *tmcf, nxt_router_engine_conf_t *recf, nxt_queue_t *sockets, nxt_work_handler_t handler) { + nxt_int_t ret; nxt_joint_job_t *job; nxt_queue_link_t *qlk; nxt_socket_conf_t *skcf; @@ -2559,6 +2565,11 @@ nxt_router_engine_joints_create(nxt_router_temp_conf_t *tmcf, job->work.data = joint; + ret = nxt_upstreams_joint_create(tmcf, &joint->upstreams); + if (nxt_slow_path(ret != NXT_OK)) { + return ret; + } + joint->count = 1; skcf = nxt_queue_link_data(qlk, nxt_socket_conf_t, link); |