Return None when no IPs could be resolved
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Alex 2021-10-18 12:41:46 +02:00
parent 238c0162c0
commit b32a799c76
No known key found for this signature in database
GPG Key ID: EDABF9711E244EB1
1 changed files with 3 additions and 0 deletions

View File

@ -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))
}