From fa746d0749cbac6983a64443b8f57bdce5b54d56 Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 23 Jun 2022 22:15:09 +0200 Subject: [PATCH] Print error if room stops with an error --- src/euph/room.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/euph/room.rs b/src/euph/room.rs index 9315537..3f4bf2d 100644 --- a/src/euph/room.rs +++ b/src/euph/room.rs @@ -42,10 +42,14 @@ impl State { conn_tx: None, }; - select! { - _ = canary => (), - _ = Self::reconnect(&name, &event_tx) => (), - _ = state.handle_events(&mut event_rx) => (), + let result = select! { + _ = canary => Ok(()), + _ = Self::reconnect(&name, &event_tx) => Ok(()), + e = state.handle_events(&mut event_rx) => e, + }; + + if let Err(e) = result { + error!("e&{name}: {}", e); } }