partey_workadventure/pusher
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 Migrating away from the notion of public/private URL in WorkAdventure Github repository 2021-07-15 17:07:47 +02:00
.dockerignore Adding a Pusher container as a middleware/dispatcher between front and back 2020-11-26 17:53:30 +01:00
.eslintrc.json Adding a Pusher container as a middleware/dispatcher between front and back 2020-11-26 17:53:30 +01:00
.gitignore Adding a Pusher container as a middleware/dispatcher between front and back 2020-11-26 17:53:30 +01: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
Dockerfile.prod *: Dockerfiles cleanup, docker-compose.prod.yaml 2021-01-12 22:32:37 +01:00
jasmine.json Adding a Pusher container as a middleware/dispatcher between front and back 2020-11-26 17:53:30 +01:00
LICENSE.txt Adding a Pusher container as a middleware/dispatcher between front and back 2020-11-26 17:53:30 +01:00
package.json FEATURE: users can now login via an openID client 2021-07-30 15:43:46 +02:00
README.md Adding a Pusher container as a middleware/dispatcher between front and back 2020-11-26 17:53:30 +01:00
server.ts Add a PUSHER_HTTP_PORT configuration variable. 2021-01-04 18:23:33 +01:00
tsconfig.json Adding support for "readableBy" and "writableBy" in back 2021-07-19 10:16:43 +02:00
yarn.lock Release v1.4.15 () 2021-09-05 19:51:33 +02:00

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").