diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ab42df7..79a9ee8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ Thanks to: @dathbe. - [weather] Fixed handling of empty values in weathergov providers handling of precipitationAmount (#3859) - [calendar] Fix regression handling of limit days (#3840) - [calendar] Fixed regression of calendarfetcherutils.shouldEventBeExcluded (#3841) +- [core] Fixed socket.io timeout when server is slow to send notification, notification lost at client (#3380) ## [2.32.0] - 2025-07-01 diff --git a/js/server.js b/js/server.js index 95fd2b82..3b4e2503 100644 --- a/js/server.js +++ b/js/server.js @@ -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) => { diff --git a/js/socketclient.js b/js/socketclient.js index d8408e9e..73fdbf08 100644 --- a/js/socketclient.js +++ b/js/socketclient.js @@ -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 () {};