Skip to content

Commit

Permalink
Add error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidigueira committed Nov 18, 2022
1 parent 0c50ed2 commit 708a110
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/net/plex/plex_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 708a110

Please sign in to comment.