diff options
author | Valentin Bartenev <vbart@nginx.com> | 2018-04-17 21:13:43 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2018-04-17 21:13:43 +0300 |
commit | ab4f86799635077f3144456de59d3b7487a2bce0 (patch) | |
tree | 37354788173b4a8eed4c5d58b1da090c79753b5b /src/nxt_application.c | |
parent | 7f79f2f10505403750739691346de1626a330f60 (diff) | |
download | unit-ab4f86799635077f3144456de59d3b7487a2bce0.tar.gz unit-ab4f86799635077f3144456de59d3b7487a2bce0.tar.bz2 |
Added missing checks if nxt_port_rpc_register_handler() failed.
This closes #97 issue on GitHub.
Thanks to 洪志道 (Hong Zhi Dao).
Diffstat (limited to 'src/nxt_application.c')
-rw-r--r-- | src/nxt_application.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_application.c b/src/nxt_application.c index 061bc220..2a03b8f5 100644 --- a/src/nxt_application.c +++ b/src/nxt_application.c @@ -73,6 +73,10 @@ nxt_discovery_start(nxt_task_t *task, void *data) nxt_discovery_quit, main_port->pid, NULL); + if (nxt_slow_path(stream == 0)) { + return NXT_ERROR; + } + ret = nxt_port_socket_write(task, main_port, NXT_PORT_MSG_MODULES, -1, stream, discovery_port->id, b); |