Skip to content

Commit 1be41c9

Browse files
committed
Add some clarifying comments
1 parent f90e4e5 commit 1be41c9

File tree

1 file changed

+3
-0
lines changed
  • mullvad-relay-selector/src/relay_selector

1 file changed

+3
-0
lines changed

mullvad-relay-selector/src/relay_selector/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -676,8 +676,11 @@ impl RelaySelector {
676676
// Remove candidate queries based on runtime parameters before trying to merge user
677677
// settings
678678
.filter(|query| runtime_params.compatible(query))
679+
// Check if the user query aligns with the runtime parameters so that if the user
680+
// has selected an ip version that is not available it will return an error
679681
.filter(|_query| runtime_params.compatible(&user_query))
680682
.filter_map(|query| query.clone().intersection(user_query.clone()))
683+
// Resolve query ip version set to Any based on runtime ip availability
681684
.map(|query| resolve_valid_ip_version(&query, &runtime_params))
682685
.filter(|query| Self::get_relay_inner(query, parsed_relays, user_config.custom_lists).is_ok())
683686
.cycle() // If the above filters remove all relays, cycle will also return an empty iterator

0 commit comments

Comments
 (0)