From 792ef9d3c71c6843dbbde450a2d6d1ade538f1f3 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Mon, 6 Apr 2020 16:52:11 +0300 Subject: Fixing 'find & add' racing condition in connected ports hash. Missing error log messages added. --- src/nxt_unit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nxt_unit.c') 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; } -- cgit