Skip to content

Commit

Permalink
Warn instead of panic on send failure
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsteen committed Jan 6, 2025
1 parent 71745ff commit 6f137e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion matchbox_socket/src/webrtc_socket/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl WebRtcChannel {
/// # Panics
/// Panics if the socket future is dropped.
pub fn send(&mut self, packet: Packet, peer: PeerId) {
self.try_send(packet, peer).expect("Send failed");
let _ = self.try_send(packet, peer).inspect_err(|err| log::warn!("Send failed: {err:?}"));
}
}

Expand Down

0 comments on commit 6f137e7

Please sign in to comment.