From af02cccc2aa23e944350c271c7daca8dd55e3396 Mon Sep 17 00:00:00 2001 From: Ferdinand Schober Date: Thu, 21 Mar 2024 15:35:21 +0100 Subject: [PATCH] exit instead of panicing when con to backend lost --- src/frontend/gtk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/gtk.rs b/src/frontend/gtk.rs index 6b7e03f..7d7dea1 100644 --- a/src/frontend/gtk.rs +++ b/src/frontend/gtk.rs @@ -129,7 +129,7 @@ fn build_ui(app: &Application) { window.imp().stream.borrow_mut().replace(tx); glib::spawn_future_local(clone!(@weak window => async move { loop { - let notify = receiver.recv().await.unwrap(); + let notify = receiver.recv().await.unwrap_or_else(|_| process::exit(1)); match notify { FrontendNotify::NotifyClientActivate(handle, active) => { window.activate_client(handle, active);