-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix WS disconnection handling #30
Conversation
- Demonitor the gun process before shutting it down through gun. - Handle disconnections detected by monitor ('DOWN' monitor message)
A new option ws_ping_timeout enables to set the time to wait for the ws pings coming from the server.
jsx:is_term/1 appears to crash when it tries to check upon tuples
31ae2ec
to
340acc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. What would also be important to test, but maybe only manually is how grisp_connect
handles a longer disconnect or a random sequence of different kinds of disconnects. Do we get some queue up of gun instances for example? I can't think of a test case, but manually we should just unplug and replug the ethernet cable a lot to test the handling of this kind of disconnect as well. (Is it the same as crashing gun? I don't think so.)
Oh the previous comment only refers to the tests. I missed the commits before. Wait for another approval! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See inline comments, rest looks good.
Quick or Long network interrruptions are unhandled (undetected) by gun. So an API call will just timeout but gun will not generate errors. That is why the |
The following reconnections scenarios are handled in this PR
This PR requires stritzinger/kraft#3 to go in production