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.
This commit is contained in:
parent
2f022280f2
commit
113e0ae1f9
1 changed files with 12 additions and 1 deletions
|
|
@ -164,7 +164,18 @@ pub(crate) fn wayland_handler(
|
||||||
if app_data.exit {
|
if app_data.exit {
|
||||||
break;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue