mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-10 15:51:28 +03:00
exit instead of panicing when con to backend lost
This commit is contained in:
@@ -129,7 +129,7 @@ fn build_ui(app: &Application) {
|
|||||||
window.imp().stream.borrow_mut().replace(tx);
|
window.imp().stream.borrow_mut().replace(tx);
|
||||||
glib::spawn_future_local(clone!(@weak window => async move {
|
glib::spawn_future_local(clone!(@weak window => async move {
|
||||||
loop {
|
loop {
|
||||||
let notify = receiver.recv().await.unwrap();
|
let notify = receiver.recv().await.unwrap_or_else(|_| process::exit(1));
|
||||||
match notify {
|
match notify {
|
||||||
FrontendNotify::NotifyClientActivate(handle, active) => {
|
FrontendNotify::NotifyClientActivate(handle, active) => {
|
||||||
window.activate_client(handle, active);
|
window.activate_client(handle, active);
|
||||||
|
|||||||
Reference in New Issue
Block a user