From b32a799c76b5f033437c96add3f196dc29e9acb4 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 18 Oct 2021 12:41:46 +0200 Subject: Return None when no IPs could be resolved --- src/util.rs | 3 +++ 1 file changed, 3 insertions(+) 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>(); + if hosts.is_empty() { + return None; + } Some((pubkey, hosts)) } -- cgit v1.2.3