Skip to content

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