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

Add reconnect logic for Pusher #475

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Add reconnect logic for Pusher #475

merged 1 commit into from
Sep 11, 2020

Conversation

marcaaron
Copy link
Contributor

@marcaaron marcaaron commented Sep 11, 2020

cc @tgolen @chiragsalian

Fixes: #465

I think this should fix just about every possible Pusher failure to subscribe or connect scenario when there is or will eventually be a good authToken.

Tests

  1. Set up 5 second authTokens to simulate expiry
  2. Log into RNC and verify you are able to subscribe window.getPusherInstance() look at channels etc
  3. Turn off WiFi
  4. Wait until you see the Pusher errors and see the state change to "unavailable"
  5. Turn on WiFi
  6. Wait until you are successfully re-authenticated and errors stop streaming the logs
  7. Check the Pusher instance again and verify you are subscribed.

Copy link
Contributor

@chiragsalian chiragsalian left a comment

Choose a reason for hiding this comment

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

LGTM and works well.

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.

Cannot connect to pusher when network reconnects
4 participants