Fix retry delay cast
This commit is contained in:
parent
b1cced22c4
commit
beb63b289e
|
@ -30,8 +30,8 @@ enum CloudKitZoneResult {
|
||||||
|
|
||||||
switch ckError.code {
|
switch ckError.code {
|
||||||
case .serviceUnavailable, .requestRateLimited, .zoneBusy:
|
case .serviceUnavailable, .requestRateLimited, .zoneBusy:
|
||||||
if let retry = ckError.userInfo[CKErrorRetryAfterKey] as? Double {
|
if let retry = ckError.userInfo[CKErrorRetryAfterKey] as? NSNumber {
|
||||||
return .retry(afterSeconds: retry)
|
return .retry(afterSeconds: retry.doubleValue)
|
||||||
} else {
|
} else {
|
||||||
return .failure(error: CloudKitError(ckError))
|
return .failure(error: CloudKitError(ckError))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue