File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
- ## 0.16.1
1
+ ## 0.16.1
2
2
- Emit ` ToSwarm::NewExternalAddrOfPeer ` for newly discovered peers.
3
3
See [ PR 5138] ( https://github.com/libp2p/rust-libp2p/pull/5138 ) .
4
+ - Log error instead of panicking when sending response to channel fails
5
+ See [ PR 6002] ( https://github.com/libp2p/rust-libp2p/pull/6002 ) .
4
6
5
7
## 0.16.0
6
8
Original file line number Diff line number Diff line change @@ -189,9 +189,12 @@ impl NetworkBehaviour for Behaviour {
189
189
handle_request ( peer_id, request, & mut self . registrations )
190
190
{
191
191
if let Some ( resp) = response {
192
- self . inner
193
- . send_response ( channel, resp)
194
- . expect ( "Send response" ) ;
192
+ if let Err ( resp) = self . inner . send_response ( channel, resp) {
193
+ tracing:: debug!(
194
+ %peer_id,
195
+ "Failed to send response, peer disconnected {resp:?}"
196
+ ) ;
197
+ }
195
198
}
196
199
197
200
return Poll :: Ready ( ToSwarm :: GenerateEvent ( event) ) ;
You can’t perform that action at this time.
0 commit comments