summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_unit.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-04-06 16:52:11 +0300
committerMax Romanov <max.romanov@nginx.com>2020-04-06 16:52:11 +0300
commit792ef9d3c71c6843dbbde450a2d6d1ade538f1f3 (patch)
tree5b2c15a2b3d6f7855b0209b74a6d855e30245b17 /src/nxt_unit.c
parenta49023229ec0a404665a711fbf35f6b3bf715825 (diff)
downloadunit-792ef9d3c71c6843dbbde450a2d6d1ade538f1f3.tar.gz
unit-792ef9d3c71c6843dbbde450a2d6d1ade538f1f3.tar.bz2
Fixing 'find & add' racing condition in connected ports hash.
Missing error log messages added.
Diffstat (limited to 'src/nxt_unit.c')
-rw-r--r--src/nxt_unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nxt_unit.c b/src/nxt_unit.c
index 160b849a..c2e7f198 100644
--- a/src/nxt_unit.c
+++ b/src/nxt_unit.c
@@ -4312,6 +4312,9 @@ nxt_unit_add_port(nxt_unit_ctx_t *ctx, nxt_unit_port_t *port)
rc = nxt_unit_port_hash_add(&lib->ports, &new_port->port);
if (nxt_slow_path(rc != NXT_UNIT_OK)) {
+ nxt_unit_alert(ctx, "add_port: %d,%d hash_add failed",
+ port->id.pid, port->id.id);
+
goto unlock;
}