1
0
Fork 0
forked from wry/wry

config: ensure panics are printed to the logs

This commit is contained in:
Julian Orth 2024-03-05 22:41:32 +01:00
parent d4d76c0ef3
commit d231021afc
5 changed files with 41 additions and 5 deletions

View file

@ -55,6 +55,7 @@ use {
};
pub(super) struct ConfigProxyHandler {
pub path: Option<String>,
pub client_data: Cell<*const u8>,
pub dropped: Cell<bool>,
pub _lib: Option<Library>,
@ -100,6 +101,12 @@ impl ConfigProxyHandler {
self.timers_by_id.clear();
self.pollables.clear();
if let Some(path) = &self.path {
if let Err(e) = uapi::unlink(path.as_str()) {
log::error!("Could not unlink {}: {}", path, ErrorFmt(OsError(e.0)));
}
}
}
pub fn send(&self, msg: &ServerMessage) {