Fixing 'find & add' racing condition in connected ports hash.

Missing error log messages added.
This commit is contained in:
Max Romanov
2020-04-06 16:52:11 +03:00
parent a49023229e
commit 792ef9d3c7
4 changed files with 29 additions and 32 deletions

View File

@@ -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;
}