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

Wifi off doesn't trigger errors #32

Open
saschatimme opened this issue Jul 10, 2017 · 2 comments
Open

Wifi off doesn't trigger errors #32

saschatimme opened this issue Jul 10, 2017 · 2 comments

Comments

@saschatimme
Copy link
Owner

Pulled out from #27
@bigardone:

The issue I'm having is that once the connection is made and the channel is joined, if I turn off the wifi it is not receiving any error or anything (not even the onAbnormalClose), until it reaches the socket timeout (which is set to 45 seconds). What I have done is creating a new out port which it is called as the window.navigator.onLine event handlers (https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine), so it detects it immediately. Does it make sense?

@saschatimme
Copy link
Owner Author

saschatimme commented Jul 10, 2017

@bigardone I think an error should be thrown for this scenario.
To find out what is (not) happening I think you should start here.

This action should be triggered from the underlying websocket package. Is there a message after you turn off the wifi? Is there an error code? (Here is a list of the error codes).
There is also a Socket.withDebug method which should give you more information.

If Die is not triggered, you could dig deeper into the underlying websocket package. The relevant interaction with it happens here.

Hope this helps you, but if your current solution is working reliable I completely understand if you don't do anything ☺️

@bigardone
Copy link

@saschatimme I totally agree on that. I'm going to investigate a bit more and share here what I discover in the process :)

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

No branches or pull requests

2 participants