diff options
author | Valentin Bartenev <vbart@nginx.com> | 2020-04-08 15:15:24 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2020-04-08 15:15:24 +0300 |
commit | 27c1e268563da002e57f34032499efd7543b8b9d (patch) | |
tree | 2a33632b5826fa6dfd98dc2aea959fddf89f5000 | |
parent | ce53d6bdb1a61de0f81dad39a978dec92e286071 (diff) | |
download | unit-27c1e268563da002e57f34032499efd7543b8b9d.tar.gz unit-27c1e268563da002e57f34032499efd7543b8b9d.tar.bz2 |
Controller: eliminated extra control socket's sockaddr copying.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_controller.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c index cc1ed534..ad292421 100644 --- a/src/nxt_controller.c +++ b/src/nxt_controller.c @@ -402,24 +402,14 @@ nxt_controller_conf_send(nxt_task_t *task, nxt_conf_value_t *conf, nxt_int_t nxt_runtime_controller_socket(nxt_task_t *task, nxt_runtime_t *rt) { - nxt_sockaddr_t *sa; nxt_listen_socket_t *ls; - sa = rt->controller_listen; - ls = nxt_mp_alloc(rt->mem_pool, sizeof(nxt_listen_socket_t)); if (ls == NULL) { return NXT_ERROR; } - ls->sockaddr = nxt_sockaddr_create(rt->mem_pool, &sa->u.sockaddr, - sa->socklen, sa->length); - if (ls->sockaddr == NULL) { - return NXT_ERROR; - } - - ls->sockaddr->type = sa->type; - nxt_sockaddr_text(ls->sockaddr); + ls->sockaddr = rt->controller_listen; nxt_listen_socket_remote_size(ls); |