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:
Jorropo
2023-08-16 18:24:41 +02:00
committed by GitHub
parent 676a35f59b
commit 2398ba4fac
+2 -1
View File
@@ -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