diff options
| -rw-r--r-- | mullvad-daemon/src/relays.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs index fea9bd8340..ff49e97c6e 100644 --- a/mullvad-daemon/src/relays.rs +++ b/mullvad-daemon/src/relays.rs @@ -262,12 +262,11 @@ impl RelaySelector { }) } Constraint::Only(LocationConstraint::Hostname(ref country, ref city, ref hostname)) => { - relay - .location - .as_ref() - .map_or(relay.hostname == *hostname, |loc| { - loc.country_code == *country && loc.city_code == *city - }) + relay.location.as_ref().map_or(false, |loc| { + loc.country_code == *country + && loc.city_code == *city + && relay.hostname == *hostname + }) } }; if !matches_location { |
