mirror of
https://github.com/libp2p/go-libp2p.git
synced 2026-04-23 00:27:05 +08:00
cleanup: add continue in case of failure in the (*BasicHost).Addrs certhash loop (#2492)
This does not do change anything because the transport always returns the same multiaddr you passed in in case of failure, it just looks wrong and relies on a obscure detail of the webtransport's AddCertHashes function, while this does not.
This commit is contained in:
@@ -792,10 +792,11 @@ func (h *BasicHost) Addrs() []ma.Multiaddr {
|
||||
continue
|
||||
}
|
||||
addrWithCerthash, added := tpt.AddCertHashes(addr)
|
||||
addrs[i] = addrWithCerthash
|
||||
if !added {
|
||||
log.Debug("Couldn't add certhashes to webtransport multiaddr because we aren't listening on webtransport")
|
||||
continue
|
||||
}
|
||||
addrs[i] = addrWithCerthash
|
||||
}
|
||||
}
|
||||
return addrs
|
||||
|
||||
Reference in New Issue
Block a user