diff --git a/crates/pi-natives/src/desktop/linux/wayland/libei.rs b/crates/pi-natives/src/desktop/linux/wayland/libei.rs index 8e317ece1..e9fb81ca9 100644 --- a/crates/pi-natives/src/desktop/linux/wayland/libei.rs +++ b/crates/pi-natives/src/desktop/linux/wayland/libei.rs @@ -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) }, }