diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2022-07-27 13:26:50 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2022-07-27 14:37:12 +0200 |
| commit | 16873ae313c62c15d768c8062571bccf5875d907 (patch) | |
| tree | 27c7bc8824e57a4d917b251f4341c555e5e41a4e | |
| parent | 0e68472763a24335c972f7c386d6fdc002118747 (diff) | |
| download | mullvadvpn-16873ae313c62c15d768c8062571bccf5875d907.tar.xz mullvadvpn-16873ae313c62c15d768c8062571bccf5875d907.zip | |
AsyncOperation: refactor checkReadiness()
| -rw-r--r-- | ios/MullvadVPN/Operations/AsyncOperation.swift | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ios/MullvadVPN/Operations/AsyncOperation.swift b/ios/MullvadVPN/Operations/AsyncOperation.swift index 725c062a67..1655098af6 100644 --- a/ios/MullvadVPN/Operations/AsyncOperation.swift +++ b/ios/MullvadVPN/Operations/AsyncOperation.swift @@ -371,12 +371,11 @@ class AsyncOperation: Operation { private func checkReadiness() { operationLock.lock() + defer { operationLock.unlock() } if state == .pending, !_isCancelled, super.isReady { evaluateConditions() } - - operationLock.unlock() } private func tryFinish(error: Error?) -> Bool { |
