mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-14 16:13:57 +00:00
socket.io times out and closes the client side socket without any callback sendSocntNotification() from the server side data is lost as the socket is closed. but the client doesn't know increase the timeout fixes #3380
This commit is contained in:
@@ -42,7 +42,9 @@ function Server (config) {
|
||||
origin: /.*$/,
|
||||
credentials: true
|
||||
},
|
||||
allowEIO3: true
|
||||
allowEIO3: true,
|
||||
pingInterval: 120000, // server → client ping every 2 mins
|
||||
pingTimeout: 120000 // wait up to 2 mins for client pong
|
||||
});
|
||||
|
||||
server.on("connection", (socket) => {
|
||||
|
@@ -13,7 +13,9 @@ const MMSocket = function (moduleName) {
|
||||
base = config.basePath;
|
||||
}
|
||||
this.socket = io(`/${this.moduleName}`, {
|
||||
path: `${base}socket.io`
|
||||
path: `${base}socket.io`,
|
||||
pingInterval: 120000, // send pings every 2 mins
|
||||
pingTimeout: 120000 // wait up to 2 mins for a pong
|
||||
});
|
||||
|
||||
let notificationCallback = function () {};
|
||||
|
Reference in New Issue
Block a user