Keep loading until live content arrives

This commit is contained in:
2026-05-13 02:18:48 -04:00
parent 8fb1277ced
commit 74731d4faa
@@ -347,7 +347,6 @@ fn poll_frame(
rendering_context_kind: RenderingContextKind,
) -> Result<LiveOutcome, LiveSidecarError> {
let started_at = Instant::now();
let mut latest = None;
loop {
host.tick();
@@ -363,14 +362,13 @@ fn poll_frame(
if !session.awaiting_visible_frame {
return Ok(outcome);
}
latest = Some(outcome);
}
if !session.awaiting_visible_frame {
return Ok(LiveOutcome::empty());
}
if started_at.elapsed() >= LIVE_FRAME_WAIT_TIMEOUT {
return Ok(latest.unwrap_or_else(LiveOutcome::empty));
return Ok(LiveOutcome::empty());
}
thread::sleep(LIVE_FRAME_WAIT_INTERVAL);