mirror of
https://github.com/block/buzz.git
synced 2026-10-31 06:21:34 +00:00
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>