summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift b/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift
index ab3bacffaa..4cd84dc074 100644
--- a/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift
+++ b/ios/PacketTunnel/TunnelMonitor/TunnelMonitor.swift
@@ -397,9 +397,9 @@ final class TunnelMonitor: PingerDelegate {
nslock.lock()
defer { nslock.unlock() }
- guard let probeAddress = probeAddress, let newStats = getStats() else {
- return
- }
+ guard let probeAddress = probeAddress, let newStats = getStats(),
+ state.connectionState == .connecting || state.connectionState == .connected
+ else { return }
// Check if counters were reset.
let isStatsReset = newStats.bytesReceived < state.netStats.bytesReceived ||