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

[Relay] Add invalidation of background task #458

Merged
merged 2 commits into from
Aug 24, 2022

Conversation

llbartekll
Copy link
Contributor

Description

Invalidates background tasks when app is entering foreground

Resolves #456

How Has This Been Tested?

Due Dilligence

  • Breaking change
  • Requires a documentation update

@llbartekll llbartekll requested a review from flypaper0 August 23, 2022 08:17
@arein arein added the accepted label Aug 23, 2022

func invalidate() {
#if os(iOS)
if backgroundTaskID != .invalid {
Copy link
Contributor

Choose a reason for hiding this comment

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

why this check required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

os check because we are using UIApplication

Copy link
Contributor Author

Choose a reason for hiding this comment

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

backgroundTaskID != .invalid to not call endBackgroundTask with invalid task id

@llbartekll llbartekll changed the title Add invalidation of background task [Relay] Add invalidation of background task Aug 24, 2022
@llbartekll llbartekll merged commit d577fb9 into develop Aug 24, 2022
@llbartekll llbartekll deleted the #456-invalidate-background-task branch August 24, 2022 12:06
@flypaper0
Copy link
Contributor

approved

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

Successfully merging this pull request may close these issues.

3 participants