mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
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>