From 708a1100402e8389ad8779906039e80ad3ea2791 Mon Sep 17 00:00:00 2001 From: Manuel Date: Fri, 18 Nov 2022 19:28:40 +0100 Subject: [PATCH] Add error message --- src/net/plex/plex_listener.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/net/plex/plex_listener.rs b/src/net/plex/plex_listener.rs index efb7d08..b25abee 100644 --- a/src/net/plex/plex_listener.rs +++ b/src/net/plex/plex_listener.rs @@ -46,13 +46,19 @@ impl PlexListener { let fuse = Fuse::new(); loop { - if let Ok((remote, connection)) = listener.accept().await { + let connection = listener.accept().await; + + if let Ok((remote, connection)) = connection { fuse.spawn(PlexListener::serve( remote, connection, accept_inlet.clone(), settings.multiplex_settings.clone(), )); + } else { + if let Err(e) = connection { + println!("Error listening! {:?}", e); + } } } }