Configure server ping timeout to 60 seconds

The default socket.io server-side ping timeout was changed from 60 seconds to 5 seconds. In browsers based on Chrome, this is not enough time to respond when the browser is idle. The end result is that the server sets the user away and then back approximately once every minute if the client window is idle, which is undesirable.

This change restores the previous timeout value.

See https://github.com/socketio/socket.io/issues/3259#issuecomment-474523271.
This commit is contained in:
Emily Strickland 2021-02-28 18:53:36 -08:00 committed by GitHub
parent f99e4eef77
commit c782ca5b93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,6 +167,7 @@ module.exports = function (options = {}) {
cookie: false,
serveClient: false,
transports: Helper.config.transports,
pingTimeout: 60000,
});
sockets.on("connect", (socket) => {