diff --git a/p2p/net/swarm/swarm_dial.go b/p2p/net/swarm/swarm_dial.go index f8c0e0e68d..9275602819 100644 --- a/p2p/net/swarm/swarm_dial.go +++ b/p2p/net/swarm/swarm_dial.go @@ -425,9 +425,10 @@ func isFdConsumingAddr(addr ma.Multiaddr) bool { } func isExpensiveAddr(addr ma.Multiaddr) bool { - _, err1 := addr.ValueForProtocol(ma.P_WS) - _, err2 := addr.ValueForProtocol(ma.P_WSS) - return err1 == nil || err2 == nil + _, wsErr := addr.ValueForProtocol(ma.P_WS) + _, wssErr := addr.ValueForProtocol(ma.P_WSS) + _, wtErr := addr.ValueForProtocol(ma.P_WEBTRANSPORT) + return wsErr == nil || wssErr == nil || wtErr == nil } func isRelayAddr(addr ma.Multiaddr) bool {