M9: leaving stops sending at its deadline, however much is left

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
fluid-chey
2026-11-04 14:22:49 -07:00
co-authored by Claude Opus 5.5
parent f49a8df47c
commit 7560e13e6f
+3
View File
@@ -346,6 +346,9 @@ fn leave_paced(writer: &mut WebSocket<Duplex>, paced: &mut Paced<ClientMsg>) {
let give_up = Instant::now() + LEAVE_DRAIN;
loop {
let now = Instant::now();
if now >= give_up {
return;
}
if let Some(m) = paced.take_due(now) {
if !send(writer, &m) {
return;