mirror of
https://github.com/block/buzz.git
synced 2026-11-08 18:31:56 +00:00
retransmit_resolved_edit passed the raw card-expiry deadline to register_publish_ack, so a connected socket that writes the EVENT but never sees the relay's OK (lost response, no observed disconnect) parked the waiter for the whole <=300s card window, then exited at the loop-top expiry check with zero retransmissions — the card could still strand as "Timed out". Cap each attempt at min(now + SENTINEL_PUBLISH_TIMEOUT_SECS, expiry_deadline), mirroring the pending sentinel path, so a stuck waiter sweeps Uncertain promptly and the identical signed event is resent while card expiry stays the overall loop bound. New regression (test_pair_resolved_lost_ok + a paused-time test driving retransmit_resolved_edit directly) proves it: reverting to the raw expiry deadline emits one publish and turns the test red. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>