summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/REST/RESTNetworkOperation.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/ios/MullvadVPN/REST/RESTNetworkOperation.swift b/ios/MullvadVPN/REST/RESTNetworkOperation.swift
index f2760bcbcf..1d75bfe027 100644
--- a/ios/MullvadVPN/REST/RESTNetworkOperation.swift
+++ b/ios/MullvadVPN/REST/RESTNetworkOperation.swift
@@ -135,9 +135,6 @@ extension REST {
return
}
- // Increment retry count
- retryCount += 1
-
// Check if retry count is not exceeded.
guard retryCount < retryStrategy.maxRetryCount else {
logger.debug("Ran out of retry attempts (\(retryStrategy.maxRetryCount))", metadata: loggerMetadata)
@@ -146,6 +143,9 @@ extension REST {
return
}
+ // Increment retry count
+ retryCount += 1
+
// Retry immediatly if retry delay is set to .never
guard retryStrategy.retryDelay != .never else {
sendRequest(endpoint: endpoint, completionHandler: completionHandler)