diff options
author | Alex Auvolat <alex@adnab.me> | 2023-03-09 12:13:41 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-03-09 12:13:41 +0100 |
commit | ca486f05ca630080f56d215f28bdd14a6cf7ab83 (patch) | |
tree | d6014dc3d66c0512f0e9eba6d3d417ca7e6e56b4 /src | |
parent | 298a01d710f85eb56f3802e9d41657d50f5bcd6d (diff) | |
download | wgautomesh-ca486f05ca630080f56d215f28bdd14a6cf7ab83.tar.gz wgautomesh-ca486f05ca630080f56d215f28bdd14a6cf7ab83.zip |
stoopid
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 855cb39..d16e03c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -379,7 +379,8 @@ impl State { } } 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); Command::new("wg") .args([ |