Skip to content

Commit

Permalink
Disable word pointer task cancellation to prevent concurrency issue (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamede1945 authored Dec 9, 2023
1 parent 6d2bcec commit 83dda2c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ actor DownloadSessionDelegate: NetworkSessionDelegate {
}

func networkSession(_ session: NetworkSession, task: NetworkSessionTask, didCompleteWithError sessionError: Error?) async {
logger.info("Finished downloading \(describe(task)). Error: \(String(describing: sessionError))")
logger.debug("Finished downloading \(describe(task)). Error: \(String(describing: sessionError))")
guard let response = await dataController.downloadRequestResponse(for: task) else {
if let sessionError, !sessionError.isCancelled {
logger.warning("[networkSession:didCompleteWithError] Cannot find onGoingDownloads for task \(describe(task))")
Expand Down
3 changes: 0 additions & 3 deletions Features/WordPointerFeature/WordPointerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,6 @@ public final class WordPointerViewController: UIViewController {
showMagnifyingGlassIfNeeded()
moveMagnifyingGlass(to: arrowPoint)
let status = await viewModel.viewPanned(to: arrowPoint, in: container)
if Task.isCancelled {
return
}
switch status {
case .none:
break
Expand Down

0 comments on commit 83dda2c

Please sign in to comment.