diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-08-12 13:37:49 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-08-12 13:37:49 +0300 |
commit | 2136eb411c9b99ffd65751bd13e10ce426be2492 (patch) | |
tree | c1a49ac17e97b51783d04179c9de7f5a687ef847 /src/nxt_port_socket.c | |
parent | fd2c01c58f5f3bfd357e9931a9abb64083afc3ac (diff) | |
download | unit-2136eb411c9b99ffd65751bd13e10ce426be2492.tar.gz unit-2136eb411c9b99ffd65751bd13e10ce426be2492.tar.bz2 |
Fixing issues found by static analyzer.
Diffstat (limited to 'src/nxt_port_socket.c')
-rw-r--r-- | src/nxt_port_socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c index 5ca2eb38..9d8096b2 100644 --- a/src/nxt_port_socket.c +++ b/src/nxt_port_socket.c @@ -208,6 +208,10 @@ nxt_port_socket_write2(nxt_task_t *task, nxt_port_t *port, nxt_uint_t type, nxt_debug(task, "port{%d,%d} %d: enqueue 1 notify %d, %d", (int) port->pid, (int) port->id, port->socket.fd, notify, res); + + if (nxt_slow_path(res == NXT_AGAIN)) { + return NXT_AGAIN; + } } } @@ -738,8 +742,6 @@ nxt_port_queue_read_handler(nxt_task_t *task, void *obj, void *data) (int) port->pid, (int) port->id, port->socket.fd, port->from_socket); - n = -1; - continue; } |