summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-09-18 22:45:30 +0300
committerMax Romanov <max.romanov@nginx.com>2019-09-18 22:45:30 +0300
commit1fac43eebe4136a2f57c56f23fc90a33783e63f2 (patch)
treec335f51b7c55a8d0db1eb12d1654fb5e997678a5 /src/nxt_port.c
parentab40ce3757e6f9d50c9c1a8aa4ea01cb5278eafa (diff)
downloadunit-1fac43eebe4136a2f57c56f23fc90a33783e63f2.tar.gz
unit-1fac43eebe4136a2f57c56f23fc90a33783e63f2.tar.bz2
Fixing master process crash after failed fork.
This closes #312 issue on GitHub.
Diffstat (limited to 'src/nxt_port.c')
-rw-r--r--src/nxt_port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_port.c b/src/nxt_port.c
index cef65cab..9029353a 100644
--- a/src/nxt_port.c
+++ b/src/nxt_port.c
@@ -546,7 +546,7 @@ nxt_port_use(nxt_task_t *task, nxt_port_t *port, int i)
if (i < 0 && c == -i) {
- if (task->thread->engine == port->engine) {
+ if (port->engine == NULL || task->thread->engine == port->engine) {
nxt_port_release(task, port);
return;