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

[SDK-2473] Fix for early branch init on install #1451

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

Conversation

nsingh-branch
Copy link
Contributor

Summary

When a BranchEvent is logged on first open before the SDK is initialized, we try to initialize first to log it properly. However, the SDK was reaching a state where processNextQueueItem was stuck and unable to process the first install or the event and nothing would happen until the next session. It seems like this was due to the BranchEvent request basically causing the queue to get stuck and the SDK to stay in an initializing state since processNextQueueItem would be skipped networkCount wasn't equal to 0.
This change updates the if statement to also set the networkCount to 0 which allows the install to be processed and then the event to be processed after that. Since this statement only applies to non-install or open events on the first session, this change shouldn't have an effect on other cases.

Motivation

Fix for a bug, mainly for the Adobe Branch plugin, but other clients may be trying to log events early in some cases as well.

Type Of Change

  • Bug fix (non-breaking change which fixes an issue)

Testing Instructions

Try out the updated testbed which logs an event from the AppDelegate before the SDK is initialized.

cc @BranchMetrics/saas-sdk-devs for visibility.

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.

1 participant