summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-11-15 10:14:05 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-11-15 10:14:05 +0100
commita91653c5ea48a9ae819966f4432f7279d6c3cccb (patch)
tree0e948d31e073cff40a01c758562646cc7db68a92
parent840d8d4e2605999f1f7e3b88babeca6b04a1b5b1 (diff)
parentc3d1a65d80d4b6063450110311a3f5677c61925e (diff)
downloadmullvadvpn-a91653c5ea48a9ae819966f4432f7279d6c3cccb.tar.xz
mullvadvpn-a91653c5ea48a9ae819966f4432f7279d6c3cccb.zip
Merge branch 'ignore-relays-without-tunnel-endpoints'
-rw-r--r--mullvad-daemon/src/relays.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs
index de01883e58..74f071e487 100644
--- a/mullvad-daemon/src/relays.rs
+++ b/mullvad-daemon/src/relays.rs
@@ -70,6 +70,12 @@ impl ParsedRelays {
let city_code = city.code.clone();
let latitude = city.latitude;
let longitude = city.longitude;
+ city.relays = city
+ .relays
+ .iter()
+ .filter(|relay| !relay.tunnels.is_empty())
+ .cloned()
+ .collect();
for relay in &mut city.relays {
let mut relay_with_location = relay.clone();
relay_with_location.location = Some(Location {