websocket-actor-system icon indicating copy to clipboard operation
websocket-actor-system copied to clipboard

Restore ping/pong support

Open samalone opened this issue 1 year ago • 0 comments

The automated ping/pong support that was in the code briefly is no longer working, and should probably be restored.

The goal of ping/pong is to:

  1. Keep the network connection live.
  2. Detect network problems early, so reconnect attempts can be started proactively.

It never really achieved the second goal, probably because there was no timeout waiting for the pong. Even when the phone is in airplane mode, the ping would hang for a long time before returning an error.

I believe that Vapor has good ping support. Perhaps that code could inspire a solution, or we could even consider adopting their WebSocket library.

samalone avatar Dec 11 '23 13:12 samalone