workadventure/back
David Négrier 05646718a9 Fix disconnects after 5 minutes in Chrome
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).
2021-09-10 18:30:36 +02:00
..
src Fix disconnects after 5 minutes in Chrome 2021-09-10 18:30:36 +02:00
tests Merge branch 'develop' of github.com:thecodingmachine/workadventure into GlobalMessageToWorld 2021-07-22 16:26:01 +02:00
.dockerignore Fixing Dockerfiles 2020-04-11 15:11:22 +02:00
.eslintrc.json Enabling stricter lint: forbidding usage of any 2020-06-09 15:51:14 +02:00
.gitignore Add io socket message to share user position. 2020-04-04 12:42:02 +02:00
.prettierignore Adding prettier on back and pusher (not running them right now) 2021-06-23 16:23:16 +02:00
.prettierrc.json Making max line length to 120 2021-06-23 16:58:57 +02:00
Dockerfile *: Dockerfiles cleanup, docker-compose.prod.yaml 2021-01-12 22:32:37 +01:00
jasmine.json added jasmine in the back 2020-04-06 15:48:19 +02:00
LICENSE.txt Changing license to AGPL + Commons Clause 2020-06-09 10:17:21 +02:00
package.json Allowing variables nested in group layers 2021-09-02 18:05:55 +02:00
server.ts Making HTTP and GRPC ports configurable in API server 2020-12-14 22:43:05 +01:00
tsconfig.json Adding support for "readableBy" and "writableBy" in back 2021-07-19 10:16:43 +02:00
yarn.lock Allowing variables nested in group layers 2021-09-02 18:05:55 +02:00