diff options
Diffstat (limited to '')
-rw-r--r-- | src/nxt_controller.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c index 4cf6ff95..ec0f99bc 100644 --- a/src/nxt_controller.c +++ b/src/nxt_controller.c @@ -89,15 +89,18 @@ static const nxt_event_conn_state_t nxt_controller_conn_close_state; nxt_int_t -nxt_controller_start(nxt_task_t *task, nxt_runtime_t *rt) +nxt_controller_start(nxt_task_t *task, void *data) { nxt_mp_t *mp; + nxt_runtime_t *rt; nxt_conf_value_t *conf; nxt_http_fields_hash_t *hash; static const nxt_str_t json = nxt_string("{ \"listeners\": {}, \"applications\": {} }"); + rt = task->thread->runtime; + hash = nxt_http_fields_hash_create(nxt_controller_request_fields, rt->mem_pool); if (nxt_slow_path(hash == NULL)) { @@ -853,13 +856,7 @@ nxt_controller_conf_pass(nxt_task_t *task, nxt_conf_value_t *conf) rt = task->thread->runtime; - nxt_runtime_port_each(rt, port) { - - if (port->type == NXT_PROCESS_ROUTER) { - break; - } - - } nxt_runtime_port_loop; + port = rt->port_by_type[NXT_PROCESS_ROUTER]; size = nxt_conf_json_length(conf, NULL); |