Return None when no IPs could be resolved
This commit is contained in:
parent
238c0162c0
commit
b32a799c76
1 changed files with 3 additions and 0 deletions
|
@ -84,5 +84,8 @@ pub fn parse_and_resolve_peer_addr(peer: &str) -> Option<(NodeID, Vec<SocketAddr
|
|||
.to_socket_addrs()
|
||||
.ok()?
|
||||
.collect::<Vec<_>>();
|
||||
if hosts.is_empty() {
|
||||
return None;
|
||||
}
|
||||
Some((pubkey, hosts))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue