This commit is contained in:
Alex 2023-03-09 12:13:41 +01:00
parent 298a01d710
commit ca486f05ca

View file

@ -379,7 +379,8 @@ impl State {
} }
} }
endpoints.sort(); endpoints.sort();
if let Some(endpoint) = endpoints.get(i % endpoints.len()) { if !endpoints.is_empty() {
let endpoint = endpoints[i % endpoints.len()];
info!("Configure {} with endpoint {}", peer.pubkey, endpoint.0); info!("Configure {} with endpoint {}", peer.pubkey, endpoint.0);
Command::new("wg") Command::new("wg")
.args([ .args([