summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.c
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2019-11-14 19:29:00 +0300
committerAndrei Belov <defan@nginx.com>2019-11-14 19:29:00 +0300
commit7630539c44fcb188bba03a65af34e952a81f2f38 (patch)
tree2c80f0cd315cae8079a39ba98ed89e02b5e1931a /src/nxt_port.c
parent70c9f18b6e8b25850bce8eb1edba4d100c3e55d2 (diff)
parent0a27f137de776925a24406cf6961c550824c63a0 (diff)
downloadunit-7630539c44fcb188bba03a65af34e952a81f2f38.tar.gz
unit-7630539c44fcb188bba03a65af34e952a81f2f38.tar.bz2
Merged with the default branch.1.13.0-1
Diffstat (limited to 'src/nxt_port.c')
-rw-r--r--src/nxt_port.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/nxt_port.c b/src/nxt_port.c
index 9029353a..8d14a5e7 100644
--- a/src/nxt_port.c
+++ b/src/nxt_port.c
@@ -238,7 +238,6 @@ void
nxt_port_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
{
nxt_port_t *port;
- nxt_process_t *process;
nxt_runtime_t *rt;
nxt_port_msg_new_port_t *new_port_msg;
@@ -261,22 +260,13 @@ nxt_port_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
return;
}
- process = nxt_runtime_process_get(rt, new_port_msg->pid);
- if (nxt_slow_path(process == NULL)) {
- return;
- }
-
- port = nxt_port_new(task, new_port_msg->id, new_port_msg->pid,
- new_port_msg->type);
+ port = nxt_runtime_process_port_create(task, rt, new_port_msg->pid,
+ new_port_msg->id,
+ new_port_msg->type);
if (nxt_slow_path(port == NULL)) {
- nxt_process_use(task, process, -1);
return;
}
- nxt_process_port_add(task, process, port);
-
- nxt_process_use(task, process, -1);
-
nxt_fd_nonblocking(task, msg->fd);
port->pair[0] = -1;
@@ -286,10 +276,6 @@ nxt_port_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
port->socket.task = task;
- nxt_runtime_port_add(task, port);
-
- nxt_port_use(task, port, -1);
-
nxt_port_write_enable(task, port);
msg->u.new_port = port;