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: fix race condition where an event can be processed before a session gets extended #198

Merged
merged 2 commits into from
May 30, 2024

Conversation

izaaz
Copy link
Collaborator

@izaaz izaaz commented May 30, 2024

Summary

This PR fixes a race condition where an event gets processed after the app enters the foreground but before amplitude gets to create a new session.

Instead of setting a flag in Amplitude when the app enters foreground, we now treat all events fired before amplitude's foreground event is fired as background events.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@izaaz izaaz requested a review from justin-fiedler May 30, 2024 04:58
Copy link
Contributor

@justin-fiedler justin-fiedler left a comment

Choose a reason for hiding this comment

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

Thanks @izaaz ! LGTM

@izaaz izaaz merged commit c3627d0 into main May 30, 2024
2 checks passed
@izaaz izaaz deleted the AMP-100738/session_elongation_fix branch May 30, 2024 17:32
github-actions bot pushed a commit that referenced this pull request May 30, 2024
## [1.16.8](v1.16.7...v1.16.8) (2024-05-30)

### Bug Fixes

* fix race condition where an event can be processed before a session gets extended ([#198](#198)) ([c3627d0](c3627d0))
Copy link

🎉 This PR is included in version 1.16.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants