diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-07-18 00:21:28 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-07-18 00:21:28 +0300 |
commit | 6b6fefa497fac704c729fcd784f0e2561ba9656a (patch) | |
tree | f60ac011ba9625a618294082989ae0e0dddfd990 /src/nxt_port.c | |
parent | 31e5992f88cd872cafa3b6384753d2970ba10041 (diff) | |
download | unit-6b6fefa497fac704c729fcd784f0e2561ba9656a.tar.gz unit-6b6fefa497fac704c729fcd784f0e2561ba9656a.tar.bz2 |
Request-app link introduced to prevent mp destroy for penging requests.
nxt_req_conn_link_t still used for lookup connection by request id.
New nxt_req_app_link_t (ra) allocated from conn->mem_pool using mp_retain().
ra stored in app->requests if there is no free worker to process request.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_port.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nxt_port.c b/src/nxt_port.c index 3f3fdd19..3c6b60b7 100644 --- a/src/nxt_port.c +++ b/src/nxt_port.c @@ -41,6 +41,8 @@ nxt_port_new(nxt_port_id_t id, nxt_pid_t pid, nxt_process_type_t type) nxt_mp_destroy(mp); } + nxt_thread_log_debug("port %p %d:%d new, type %d", port, pid, id, type); + return port; } @@ -48,6 +50,9 @@ nxt_port_new(nxt_port_id_t id, nxt_pid_t pid, nxt_process_type_t type) nxt_bool_t nxt_port_release(nxt_port_t *port) { + nxt_thread_log_debug("port %p %d:%d release, type %d", port, port->pid, + port->id, port->type); + if (port->pair[0] != -1) { nxt_fd_close(port->pair[0]); port->pair[0] = -1; |