This commit is contained in:
parent
cbdd6ab215
commit
de981aace0
1 changed files with 1 additions and 4 deletions
|
@ -80,10 +80,7 @@ pub fn parse_and_resolve_peer_addr(peer: &str) -> Option<(NodeID, Vec<SocketAddr
|
||||||
let delim = peer.find('@')?;
|
let delim = peer.find('@')?;
|
||||||
let (key, host) = peer.split_at(delim);
|
let (key, host) = peer.split_at(delim);
|
||||||
let pubkey = NodeID::from_slice(&hex::decode(&key).ok()?)?;
|
let pubkey = NodeID::from_slice(&hex::decode(&key).ok()?)?;
|
||||||
let hosts = host[1..]
|
let hosts = host[1..].to_socket_addrs().ok()?.collect::<Vec<_>>();
|
||||||
.to_socket_addrs()
|
|
||||||
.ok()?
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
if hosts.is_empty() {
|
if hosts.is_empty() {
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue