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 refreshSDK implementation #135

Open
wants to merge 2 commits into
base: adrian/update-bridgefysdk-on-ios-to-0-4-2
Choose a base branch
from

Conversation

AdrianGri
Copy link
Collaborator

Why

Suspecting that this is causing errors related to the infinite refresh loop. Even if it doesn't fix it, our current implementation of refreshing the SDK is wrong because it does not wait for the SDK to stop before starting it again.

What Changed

  • Add atom to track when the SDK should start once stopped
  • When the SDK goes offline and this atom is true, start the SDK again

Comment on lines +134 to +137
export const refreshSDKAtom = atom(null, (get, set) => {
set(shouldStartSDKAtom, true);
stopSDK();
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not completely necessary to have this abstraction but wanted to add it since that's how we had it before

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