Files
buzz/crates
Logan Johnson e7f700bc21 fix(relay): send REQ frames only while the request owns its ID
REQ handlers run in separate tasks, so a same-ID REQ can replace one
that is still reading. The replaced history, search or huddle-liveness
request then sent its EVENT and EOSE frames anyway. When the new holder
is an artifact sync, that stale EOSE tells the client a set the sync
never sent is complete. These frames now go through
close::send_if_owner, which queues a frame only while the request still
owns the ID, under the lifecycle lock.

A subscription-limit refusal (ordinary REQ and sync) now cancels the
connection when its CLOSED cannot be queued, as close::refuse does. The
ID is new there, so there is no old holder to retire.

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