diff options
Diffstat (limited to 'src/nxt_port_rpc.c')
-rw-r--r-- | src/nxt_port_rpc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nxt_port_rpc.c b/src/nxt_port_rpc.c index 792bf55f..b53fbb78 100644 --- a/src/nxt_port_rpc.c +++ b/src/nxt_port_rpc.c @@ -143,6 +143,8 @@ nxt_port_rpc_register_handler_ex(nxt_task_t *task, nxt_port_t *port, nxt_debug(task, "rpc: stream #%uD registered", stream); + nxt_port_inc_use(port); + return reg->data; } @@ -332,6 +334,8 @@ nxt_port_rpc_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg) nxt_debug(task, "rpc: stream #%uD free registration", stream); nxt_mp_free(port->mem_pool, reg); + + nxt_port_use(task, port, -1); } @@ -421,6 +425,8 @@ nxt_port_rpc_remove_peer(nxt_task_t *task, nxt_port_t *port, nxt_pid_t peer) } nxt_mp_free(port->mem_pool, reg); + + nxt_port_use(task, port, -1); } } @@ -452,4 +458,6 @@ nxt_port_rpc_cancel(nxt_task_t *task, nxt_port_t *port, uint32_t stream) nxt_debug(task, "rpc: stream #%uD cancel registration", stream); nxt_mp_free(port->mem_pool, reg); + + nxt_port_use(task, port, -1); } |