diff options
| -rw-r--r-- | ios/MullvadVPN/REST/RESTError.swift | 1 | ||||
| -rw-r--r-- | ios/MullvadVPN/TunnelManager/TunnelManager.swift | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ios/MullvadVPN/REST/RESTError.swift b/ios/MullvadVPN/REST/RESTError.swift index 3b6f24c49a..e275a9ab34 100644 --- a/ios/MullvadVPN/REST/RESTError.swift +++ b/ios/MullvadVPN/REST/RESTError.swift @@ -73,6 +73,7 @@ extension REST { static let publicKeyInUse = ServerResponseCode(rawValue: "PUBKEY_IN_USE") static let maxDevicesReached = ServerResponseCode(rawValue: "MAX_DEVICES_REACHED") static let invalidAccessToken = ServerResponseCode(rawValue: "INVALID_ACCESS_TOKEN") + static let deviceNotFound = ServerResponseCode(rawValue: "DEVICE_NOT_FOUND") let rawValue: String init(rawValue: String) { diff --git a/ios/MullvadVPN/TunnelManager/TunnelManager.swift b/ios/MullvadVPN/TunnelManager/TunnelManager.swift index 66e26f0488..71a7c3a4a9 100644 --- a/ios/MullvadVPN/TunnelManager/TunnelManager.swift +++ b/ios/MullvadVPN/TunnelManager/TunnelManager.swift @@ -954,8 +954,9 @@ extension TunnelManager { return nil case .rotateKey(.unhandledResponse(_, let serverErrorResponse)) - where serverErrorResponse?.code == .invalidAccount: - // Do not retry if account was removed. + where serverErrorResponse?.code == .invalidAccount || + serverErrorResponse?.code == .deviceNotFound: + // Do not retry if account or device were removed. return nil default: |
