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

Trigger onError callback when connection fails #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gasaichandesu
Copy link

Hi, I have met the following case. I am using access token to connect to websocket server. It's lifetime is about 20 minutes. As soon as token expires, PhoenixSocket tries to reconnect and receives 401 errors. This pull request proposes a way to intercept errors during connection process. By triggering an error, I can destroy old connection and instantiate a new one with a new access token

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