From c782ca5b933ffdb272c5ce3615fda3c0070d874f Mon Sep 17 00:00:00 2001 From: Emily Strickland Date: Sun, 28 Feb 2021 18:53:36 -0800 Subject: [PATCH] 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. --- src/server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server.js b/src/server.js index 5c941db1..3b74b0b3 100644 --- a/src/server.js +++ b/src/server.js @@ -167,6 +167,7 @@ module.exports = function (options = {}) { cookie: false, serveClient: false, transports: Helper.config.transports, + pingTimeout: 60000, }); sockets.on("connect", (socket) => {