fix(rtmp): the very silly unwrap which causes the rtmp worker to die (i think)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user