web icon indicating copy to clipboard operation
web copied to clipboard

`dev-server-core/WebSocketsManager`: send periodic ping over WebSockets to prevent connection closure for inactivity

Open larabr opened this issue 4 months ago • 3 comments

What I did

  1. Added pinging mechanism over the web sockets to prevent unexpected connection closure after ~60s (with websocket error 1006) when testing on BrowserStack (Safari).

I couldn't get to the bottom of what exactly is causing the timeout, but sending periodic ping messages fixes it. I checked if the ws server is closing the connection, but it doesn't seem to be the case; using a ping to keep the connection alive is suggested here.

larabr avatar Oct 09 '24 13:10 larabr