From 113e0ae1f9f4faf7c7bd38a8b1e55dae1c282078 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Fri, 22 May 2026 01:21:03 +0200 Subject: [PATCH] chore(applet): gracefully exit with log when panel exits This was causing confusion for users that thought this symptom may be the cause of a problem. --- src/applet/token/wayland_handler.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/applet/token/wayland_handler.rs b/src/applet/token/wayland_handler.rs index 4ab7323..3bbaf57 100644 --- a/src/applet/token/wayland_handler.rs +++ b/src/applet/token/wayland_handler.rs @@ -164,7 +164,18 @@ pub(crate) fn wayland_handler( if app_data.exit { break; } - event_loop.dispatch(None, &mut app_data).unwrap(); + + if let Err(why) = event_loop.dispatch(None, &mut app_data) { + if let calloop::Error::IoError(ref why) = why + && why.kind() == std::io::ErrorKind::BrokenPipe + { + tracing::info!("Connection to panel has ended. The applet will now exit with it."); + break; + } + + tracing::error!(?why, "dispatch error on Wayland connection to panel"); + break; + } } }