Files
buzz/crates
Logan Johnson 03b38fa54a fix(relay): retire the old holder on every in-handler REQ refusal
handle_req refused an ordinary REQ (auth, scope, channel count, channel
access, NIP-FI, p-gated, engram, author-only, mixed search, database
errors) with a bare CLOSED before it claimed the ID. A live subscription
or artifact sync that held the same ID kept delivering under an ID the
client was told is closed. These refusals now go through close::refuse,
which retires the old holder under the lifecycle lock before CLOSED and
cancels the connection if CLOSED cannot be queued.

A huddle-liveness REQ answered under the ID without claiming it, so the
old holder also survived it. It now claims the ID as a one-shot, like
search, and its own refusals close only while it still owns the ID.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Signed-off-by: Logan Johnson <loganj@squareup.com>
2026-10-26 16:31:44 -04:00
..