Triggering RPC error for all handlers on port close.

This is required to avoid crashes and memory leaks on Unit exit.
This commit is contained in:
Max Romanov
2018-03-21 16:55:09 +03:00
parent b865db1bb7
commit 778a90c319
3 changed files with 41 additions and 0 deletions

View File

@@ -86,6 +86,8 @@ nxt_port_close(nxt_task_t *task, nxt_port_t *port)
port->id, port->type);
if (port->pair[0] != -1) {
nxt_port_rpc_close(task, port);
nxt_fd_close(port->pair[0]);
port->pair[0] = -1;
}