make sure operations cancel in a timely manner

This commit is contained in:
Francisco Gindre 2021-06-19 20:38:42 -03:00
parent b5cd1eb84f
commit e107170e14
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ class CompactBlockBatchDownloadOperation: ZcashOperation {
localError = error
retries = retries + 1
}
} while !success && retries < maxRetries
} while !isCancelled && !success && retries < maxRetries
if retries >= maxRetries {
throw CompactBlockBatchDownloadOperationError.batchDownloadFailed(range: range, error: localError)
}