aboutsummaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs
index 4f6e352..047095f 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -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))
}