diff --git a/transports/webrtc/CHANGELOG.md b/transports/webrtc/CHANGELOG.md index 5b4212e9..3428a425 100644 --- a/transports/webrtc/CHANGELOG.md +++ b/transports/webrtc/CHANGELOG.md @@ -1,7 +1,11 @@ # 0.4.0-alpha.3 - unreleased +- Gracefully handle `ConnectionReset` error on individual connections, avoiding shutdown of the entire listener upon disconnect of a single client. + See [PR 3575]. + - Migrate from `prost` to `quick-protobuf`. This removes `protoc` dependency. See [PR 3312]. +[PR 3575]: https://github.com/libp2p/rust-libp2p/pull/3575 [PR 3312]: https://github.com/libp2p/rust-libp2p/pull/3312 # 0.4.0-alpha.2 diff --git a/transports/webrtc/src/tokio/udp_mux.rs b/transports/webrtc/src/tokio/udp_mux.rs index de0b31c6..4e432c2e 100644 --- a/transports/webrtc/src/tokio/udp_mux.rs +++ b/transports/webrtc/src/tokio/udp_mux.rs @@ -398,8 +398,11 @@ impl UDPMuxNewAddr { continue; } - Poll::Ready(Err(err)) if err.kind() == ErrorKind::TimedOut => {} Poll::Pending => {} + Poll::Ready(Err(err)) if err.kind() == ErrorKind::TimedOut => {} + Poll::Ready(Err(err)) if err.kind() == ErrorKind::ConnectionReset => { + log::debug!("ConnectionReset by remote client {err:?}") + } Poll::Ready(Err(err)) => { log::error!("Could not read udp packet: {}", err); return Poll::Ready(UDPMuxEvent::Error(err));