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

BUG: Re-subscribe when internet connection is lost and regained in notion-js #33

Closed
andrewjaykeller opened this issue Jan 13, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@andrewjaykeller
Copy link
Contributor

Expected

A client should be able to put their process to sleep and wake it up t time later, generally greater than 3 minutes, and be able to immediately resume getting metrics.

Problem

A new subscription is created when Notion is instantiated with this library. Then if the client is, say a developer console in a chrome tab, cut off from the internet for more than two minutes (e.g. 30 minutes during a commute to work) the subscription is automatically cleaned up by the firebase API. Then when the client reconnects to the internet again the subscription is not requested again and no metrics begin to stream into our client.

Solution

Implement a local store in Notion JS to request metrics again on reconnecting to firebase servers.

@alexcastillo
Copy link
Contributor

Fixed on #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants