File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1+ # 0.9.2 - unreleased
2+
3+ - Do not duplicate the p2p/xxx component with the relay PeerId when a client requests a reservation. See [ PR 2701] .
4+
5+ [ PR 2701 ] : https://github.com/libp2p/rust-libp2p/pull/2701/
6+
17# 0.9.1
28
39- Respond to at most one incoming reservation request. Deny <= 8 incoming
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name = "libp2p-relay"
33edition = " 2021"
44rust-version = " 1.56.1"
55description = " Communications relaying for libp2p"
6- version = " 0.9.1 "
6+ version = " 0.9.2 "
77authors = [
" Parity Technologies <[email protected] >" ,
" Max Inden <[email protected] >" ]
88license = " MIT"
99repository = " https://github.com/libp2p/rust-libp2p"
Original file line number Diff line number Diff line change @@ -756,13 +756,13 @@ impl Action {
756756 inbound_reservation_req,
757757 addrs : poll_parameters
758758 . external_addresses ( )
759- . map ( |a| {
760- let p2p_proto =
761- Protocol :: P2p ( * poll_parameters . local_peer_id ( ) . as_ref ( ) ) ;
762- match a . addr . iter ( ) . last ( ) {
763- Some ( p ) if p == p2p_proto => a . addr ,
764- _ => a . addr . with ( p2p_proto ) ,
765- }
759+ . map ( |a| a . addr )
760+ // Add local peer ID in case it isn't present yet.
761+ . filter_map ( |a| match a . iter ( ) . last ( ) ? {
762+ Protocol :: P2p ( _ ) => Some ( a ) ,
763+ _ => Some (
764+ a . with ( Protocol :: P2p ( * poll_parameters . local_peer_id ( ) . as_ref ( ) ) ) ,
765+ ) ,
766766 } )
767767 . collect ( ) ,
768768 } ) ,
You can’t perform that action at this time.
0 commit comments