fix(#726): handle broadcast Lagged + clear on SSE reconnect
Distinguish RecvError::Lagged from Closed in the build-log stream loop: Lagged continues (next recv delivers the full accumulated delta via saved cursors), Closed returns (shutdown path). Clear pre.textContent and reset cursor lengths in es.onerror when readyState is CONNECTING so auto-reconnect doesn't double-append the replay from cursor=0.
This commit is contained in:
parent
050e130eba
commit
12985ade6d
2 changed files with 9 additions and 2 deletions
|
|
@ -1789,7 +1789,8 @@ async fn get_build_log_stream(
|
|||
Err(_) => return,
|
||||
}
|
||||
}
|
||||
Err(_) => return, // notification channel closed (shutdown)
|
||||
Err(tokio::sync::broadcast::error::RecvError::Lagged(_)) => continue,
|
||||
Err(tokio::sync::broadcast::error::RecvError::Closed) => return,
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue