diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-04-06 16:52:11 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-04-06 16:52:11 +0300 |
commit | 792ef9d3c71c6843dbbde450a2d6d1ade538f1f3 (patch) | |
tree | 5b2c15a2b3d6f7855b0209b74a6d855e30245b17 /src/nxt_unit.c | |
parent | a49023229ec0a404665a711fbf35f6b3bf715825 (diff) | |
download | unit-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.c | 3 |
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; } |