Skip to content

Commit 91940a2

Browse files
committed
Fixed based on feedback
1 parent a0ea523 commit 91940a2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mullvad-relay-selector/tests/relay_selector.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ fn test_wireguard_retry_order() {
391391
let relay_selector = default_relay_selector();
392392
for (retry_attempt, query) in WIREGUARD_RETRY_ORDER.iter().enumerate() {
393393
let relay = relay_selector
394-
.get_relay(retry_attempt, talpid_types::net::IpAvailability::IpV6)
394+
.get_relay(retry_attempt, talpid_types::net::IpAvailability::IpV4AndIpV6)
395395
.unwrap_or_else(|_| panic!("Retry attempt {retry_attempt} did not yield any relay"));
396396
// For each relay, cross-check that the it has the expected tunnel protocol
397397
let tunnel_type = tunnel_type(&unwrap_relay(relay.clone()));
@@ -450,7 +450,7 @@ fn test_openvpn_retry_order() {
450450

451451
for (retry_attempt, query) in OPENVPN_RETRY_ORDER.iter().enumerate() {
452452
let relay = relay_selector
453-
.get_relay(retry_attempt, talpid_types::net::IpAvailability::IpV6)
453+
.get_relay(retry_attempt, talpid_types::net::IpAvailability::IpV4AndIpV6)
454454
.unwrap_or_else(|_| panic!("Retry attempt {retry_attempt} did not yield any relay"));
455455
// For each relay, cross-check that the it has the expected tunnel protocol
456456
let tunnel_type = tunnel_type(&unwrap_relay(relay.clone()));

talpid-types/src/net/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ pub fn all_of_the_internet() -> Vec<ipnetwork::IpNetwork> {
572572
pub enum Connectivity {
573573
/// Host is offline
574574
Offline,
575-
/// The connectivity status is unknown, but persumed to be online
575+
/// The connectivity status is unknown, but presumed to be online
576576
PresumeOnline,
577577
/// Host is online with the given IP versions available
578578
Online(IpAvailability),
@@ -597,7 +597,7 @@ impl Connectivity {
597597
/// If no IP4 nor IPv6 routes exist, we have no way of reaching the internet
598598
/// so we consider ourselves offline.
599599
pub fn is_offline(&self) -> bool {
600-
matches!(self, Connectivity::Offline)
600+
self == Connectivity::Offline
601601
}
602602

603603
/// Whether IPv4 connectivity seems to be available on the host.

0 commit comments

Comments
 (0)