summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-10-04 15:02:32 +0300
committerMax Romanov <max.romanov@nginx.com>2017-10-04 15:02:32 +0300
commit439bf7df11a9e847cbd42e1503c6ed8d74f7ab09 (patch)
treed6170523155f96ad29e90abf348097f125848714
parente44401a0bb72aa66bec0322fa05e8c86fefc9074 (diff)
downloadunit-439bf7df11a9e847cbd42e1503c6ed8d74f7ab09.tar.gz
unit-439bf7df11a9e847cbd42e1503c6ed8d74f7ab09.tar.bz2
Breaking read loop by nxt_port_read_close().
Port message handler may perform fork() and then close port read file descriptor and enable write on same event fd. Next read attempt in this case may cause different errors in log file.
Diffstat (limited to '')
-rw-r--r--src/nxt_port_socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c
index 880cdf0f..dce97e83 100644
--- a/src/nxt_port_socket.c
+++ b/src/nxt_port_socket.c
@@ -461,6 +461,7 @@ nxt_port_read_enable(nxt_task_t *task, nxt_port_t *port)
void
nxt_port_read_close(nxt_port_t *port)
{
+ port->socket.read_ready = 0;
nxt_socket_close(port->socket.task, port->pair[0]);
port->pair[0] = -1;
}