mirror of
https://github.com/VallierDev/uu-remote-linux.git
synced 2026-11-16 08:50:40 +01:00
Portal: a failed staleness check no longer ends the host loop
Follow-up to #26: retire_if_closed errors (poisoned lock, panicked task) are logged and treated as not stale instead of returning from serve(). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
f35ec3b2c7
commit
e89c91e83b
1 file changed
+6
-1
+6
-1
@@ -658,7 +658,12 @@ async fn serve(mut capture: Arc<ScreenCapture>, input: Arc<InputInjector>, shutd
|
||||
}
|
||||
let stale_portal=if desktop {
|
||||
if let Some(session)=capture.portal.clone() {
|
||||
tokio::task::spawn_blocking(move || session.retire_if_closed()).await??
|
||||
// A failed check must not end the host loop; treat it as not stale.
|
||||
match tokio::task::spawn_blocking(move || session.retire_if_closed()).await {
|
||||
Ok(Ok(stale)) => stale,
|
||||
Ok(Err(error)) => { log::warn!("Portal staleness check failed: {error}"); false }
|
||||
Err(_) => { log::warn!("Portal staleness check panicked"); false }
|
||||
}
|
||||
} else { false }
|
||||
} else { false };
|
||||
if desktop && desktop_backend::headless() {
|
||||
|
||||
Reference in new issue
Block a user