-
Notifications
You must be signed in to change notification settings - Fork 212
Closed
Description
When I was building Watch Later I had to implement reconnection with an exponential backoff.
If a relay is closing a connection it should be because it doesn't want you connected to it
(@fiatjaf on #191)
I found in practical usage devices often get disconnected from relays because of moving between networks, flaky wifi, or whatever.
I also found .onClose
was not a reliable indicator of websocket connectivity. It would be useful to have some kind of optional ping/heartbeat so the client can find out as soon as the websocket becomes unreliable (e.g. packets stop going through).
This is how the ws documentation addresses it:
https://github.com/websockets/ws#how-to-detect-and-close-broken-connections
Metadata
Metadata
Assignees
Labels
No labels