mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 11:27:42 +08:00
p2p/net/swarm/addr: check for nil addr
This commit is contained in:
parent
8d08e1e3d6
commit
10ae01f624
@ -80,6 +80,9 @@ func AddrOverNonLocalIP(a ma.Multiaddr) bool {
|
||||
// as we need to be able to connect to multiple ipfs nodes
|
||||
// in the same machine.
|
||||
func AddrUsable(a ma.Multiaddr, partial bool) bool {
|
||||
if a == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
if !AddrOverNonLocalIP(a) {
|
||||
return false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user