diff --git a/crates/server/src/rtmp.rs b/crates/server/src/rtmp.rs index 3247580..7356c31 100644 --- a/crates/server/src/rtmp.rs +++ b/crates/server/src/rtmp.rs @@ -99,7 +99,14 @@ impl Rtmp { db, } = self; loop { - let (socket, peer_addr) = listener.accept().await.unwrap(); + let connection = listener.accept().await; + let (socket, peer_addr) = match connection { + Ok(e) => e, + Err(e) => { + tracing::error!("Error on connection accept: {}", e); + continue; + } + }; info!(%peer_addr, "RTMP connection accepted"); let (mut session, mut socket) = match Rtmp::handshake(socket).await { Ok(v) => v,