We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af0161e commit 01ce97cCopy full SHA for 01ce97c
p2p/host/basic/basic_host.go
@@ -811,7 +811,11 @@ func (h *BasicHost) Addrs() []ma.Multiaddr {
811
// NormalizeMultiaddr returns a multiaddr suitable for equality checks.
812
// If the multiaddr is a webtransport component, it removes the certhashes.
813
func (h *BasicHost) NormalizeMultiaddr(addr ma.Multiaddr) ma.Multiaddr {
814
- if ok, n := libp2pwebtransport.IsWebtransportMultiaddr(addr); ok && n > 0 {
+ ok, n := libp2pwebtransport.IsWebtransportMultiaddr(addr)
815
+ if !ok {
816
+ ok, n = libp2pwebrtc.IsWebRTCDirectMultiaddr(addr)
817
+ }
818
+ if ok && n > 0 {
819
out := addr
820
for i := 0; i < n; i++ {
821
out, _ = ma.SplitLast(out)
0 commit comments