Add better WebSocket connection loss handling #215
marcusbelcher
started this conversation in
Ideas
Replies: 1 comment
-
@marcusbelcher sorry for the delay. Our signaling server does support ping pong messages, https://tools.ietf.org/html/rfc6455#section-5.5.2. The only thing that we need to do is to add a handler in our SDK to listen to a timeout and emit the event when the server doesn't respond within the timeout to the application layer. But, we currently don't have any plan to add this. I'll let you know when we have a plan. Also, please feel free to open a PR for this. We're open to contributors! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem: Error is not thrown on WebSocket disconnect
Device: 15" MacBook Pro 2017
OS: macOS Catalina
Browser: Chrome v81
Misc: Turn is forced
As the Kinesis library sits on top of WebSockets it would be great if it could do a better job (than what is default behaviour) at handling connection loss. The only current way to monitor losing connection to Kinesis is to monitor peerConnection.connectionState. This is a tad tricky when you want disconnect and reconnect deliberately vs due to wifi conditions.
Use case: Going from one wifi network where Kinesis is allowed to another where it is blocked but IP whitelisted traffic is allowed (not possible with Kinesis). If I query myself or check for internet it will come back as a success yet I lost connection to Kinesis.
Useful link: https://stackoverflow.com/questions/26971026/handling-connection-loss-with-websockets
NB: This library is very helpful and I very much appreciate your work.
Beta Was this translation helpful? Give feedback.
All reactions