05646718a9
This commit increases idle timeout for websocket connection Issue: after 5 minutes of inactive tab (hidden tab) in Chrome, WorkAdventure was disconnected. I believe Google was going in "intensive throttling" mode (see https://developer.chrome.com/blog/timer-throttling-in-chrome-88/#intensive-throttling) This means setTimeouts are run only once per minute. And I believe the "keep alive" must be implemented with a "setTimeout" (one way or another even if I can't find a trace of this in the code). This would mean that the browser would send keep alive requests only once per minute. But the pusher is configured to shut the connection after 30 seconds of idle activity. Therefore, the pusher disconnects inactive Chrome tabs. By raising the Pusher idle timer to 2 minutes, we give a chance to Chrome to send a ping to the server in time (since Chrome won't send more than 1 ping per minute). |
||
---|---|---|
.. | ||
src | ||
tests | ||
.dockerignore | ||
.eslintrc.json | ||
.gitignore | ||
.prettierignore | ||
.prettierrc.json | ||
Dockerfile | ||
Dockerfile.prod | ||
jasmine.json | ||
LICENSE.txt | ||
package.json | ||
README.md | ||
server.ts | ||
tsconfig.json | ||
yarn.lock |
Pusher
The pusher component is in charge of accepting WebSocket and HTTP connections from the front and forwarding them to the correct "api" server (or to the "admin").