fix(rtmp): the very silly unwrap which causes the rtmp worker to die (i think)

This commit is contained in:
2026-07-15 14:14:44 +01:00
parent 1c38daeb51
commit 571125c5bf
+8 -1
View File
@@ -99,7 +99,14 @@ impl Rtmp {
db, db,
} = self; } = self;
loop { 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"); info!(%peer_addr, "RTMP connection accepted");
let (mut session, mut socket) = match Rtmp::handshake(socket).await { let (mut session, mut socket) = match Rtmp::handshake(socket).await {
Ok(v) => v, Ok(v) => v,