webpack-dev-server sends keep alive heartbeat when using transportMode: 'ws', consistent with sockjs-node to keep the connection open while developing.
WebSocket connection times out after a period of inactivity. A page refresh is needed to reconnect.
Create React App related issue: https://github.com/facebook/create-react-app/issues/8091
Use transportMode: 'ws', connect to running webpack-dev-server instance, and wait for socket to timeout.
Here's the RFC for ping/pong in the WebSocket spec: https://tools.ietf.org/html/rfc6455#section-5.5.2
/cc @Loonride
Easy to implement - https://github.com/websockets/ws#how-to-detect-and-close-broken-connections, somebody want to be a champion?
Easy to implement - https://github.com/websockets/ws#how-to-detect-and-close-broken-connections, somebody want to be a champion?
I can do this
Client doesn't require additional code (browser automatically sends ping)
Most helpful comment
I can do this