theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 309 forks source link

Remote WebSocket channel can close when server is busy #1143

Closed jason0x43 closed 4 years ago

jason0x43 commented 4 years ago

In Intern 4.x and 5-pre, the websocket channel between a remote and the server may close unexpectedly if no communication occurs for an extended period of time. For example, if a client takes a couple minutes to download a very large test set, during which time no messages will be sent over the websocket, the browser may kill the connection.

The WebSocket channel should send periodic ping messages to keep the channel alive. We should also try to reopen unexpectedly closed sockets.