fix(computer): bounded consent-denied portal close inline
The SelectDevices/Start/ConnectToEIS failure arm closes the RemoteDesktop session from inside runtime.block_on, so it cannot use close_session (a nested block_on panics). Bounded it with an inline tokio::time::timeout(CLOSE_TIMEOUT, ...) so a frozen xdg-desktop-portal on the ordinary denied-consent path no longer hangs the worker thread. Fixes #7884
This commit is contained in:
@@ -116,7 +116,11 @@ impl Libei {
|
||||
match fd {
|
||||
Ok(fd) => Ok((fd, session)),
|
||||
Err(err) => {
|
||||
let _ = session.close().await;
|
||||
// Already inside `runtime.block_on`, so the `close_session`
|
||||
// helper (itself a `block_on`) would abort with a nested-runtime
|
||||
// panic; bound this consent-denied close inline instead.
|
||||
let _ =
|
||||
tokio::time::timeout(crate::desktop::CLOSE_TIMEOUT, session.close()).await;
|
||||
Err(err)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user