summaryrefslogtreecommitdiffhomepage
path: root/ios
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-08-30 15:24:04 +0200
committerAndrej Mihajlov <and@mullvad.net>2022-09-21 10:33:13 +0200
commitb81679f7607cae1acb8385698eba8ac9ff6d589d (patch)
tree9eba201f1aba89fa84f3ddc70b62d3e77992adf3 /ios
parent579c8facf2e88774b4162946558c34d7c48cc465 (diff)
downloadmullvadvpn-b81679f7607cae1acb8385698eba8ac9ff6d589d.tar.xz
mullvadvpn-b81679f7607cae1acb8385698eba8ac9ff6d589d.zip
Guard against sending retryHeartbeatPing when heartbeat suspended
Diffstat (limited to 'ios')
-rw-r--r--ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift2
1 files changed, 1 insertions, 1 deletions
diff --git a/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift b/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift
index 5cd93800a3..0a97e290bc 100644
--- a/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift
+++ b/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift
@@ -116,7 +116,7 @@ final class TunnelMonitor: PingerDelegate {
let timeSinceLastPing = now.timeIntervalSince(lastRequestDate)
if let lastReplyDate = pingStats.lastReplyDate,
lastRequestDate.timeIntervalSince(lastReplyDate) >= heartbeatReplyTimeout,
- timeSinceLastPing >= pingDelay
+ timeSinceLastPing >= pingDelay, !isHeartbeatSuspended
{
return .retryHeartbeatPing
}