summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2022-04-28 14:42:07 +0100
committerEmīls <emils@mullvad.net>2022-04-28 14:42:07 +0100
commit9ef673ea6d26c32734a670147ad52a28408fa14a (patch)
tree77c48c56bfec68f91a0015e879246d53df42f69d
parent1a14f5c4c4f3818cea75bbb592d74d09b573aede (diff)
parent335c727053333d13944589d8f4c97489dffcc415 (diff)
downloadmullvadvpn-9ef673ea6d26c32734a670147ad52a28408fa14a.tar.xz
mullvadvpn-9ef673ea6d26c32734a670147ad52a28408fa14a.zip
Merge branch 'send-one-packet-upon-connecting'
-rw-r--r--CHANGELOG.md1
-rw-r--r--talpid-core/src/tunnel/wireguard/connectivity_check.rs2
2 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a2027d8ed1..112922a2af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -49,6 +49,7 @@ Line wrap the file at 100 chars. Th
- Update Electron from 16.0.4 to 18.0.3.
- Randomize bridge selection with a bias in favor of close bridges.
- Make login field keep previous value when submitting an incorrect account number in desktop app.
+- Decrease the time it takes to connect to WireGuard relays by sending an ICMP packet immediately.
### Fixed
- Fix the sometimes incorrect time added text after adding time to the account.
diff --git a/talpid-core/src/tunnel/wireguard/connectivity_check.rs b/talpid-core/src/tunnel/wireguard/connectivity_check.rs
index d6bb61a5fc..ec2af873a0 100644
--- a/talpid-core/src/tunnel/wireguard/connectivity_check.rs
+++ b/talpid-core/src/tunnel/wireguard/connectivity_check.rs
@@ -107,6 +107,8 @@ impl ConnectivityMonitor {
// checks if the tunnel has ever worked. Intended to check if a connection to a tunnel is
// successfull at the start of a connection.
pub(super) fn establish_connectivity(&mut self, retry_attempt: u32) -> Result<bool, Error> {
+ // Send initial ping to prod WireGuard into connecting.
+ self.pinger.send_icmp().map_err(Error::PingError)?;
self.establish_connectivity_inner(
retry_attempt,
ESTABLISH_TIMEOUT,