Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix continuation misuse in case of timeout #381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dioneea-sabs
Copy link

No description provided.

@dioneea-sabs dioneea-sabs changed the title Fix continuation misues in case of timeout Fix continuation misuse in case of timeout Jan 27, 2024
Copy link

@ucerxxx ucerxxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better add guard, that's safer and more swiftish

guard let self else { return }
self.continuation?.resume(throwing: LocationErrors.timeout)
self.continuation = nil
self.cancellable?.cancel(task: self)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants