mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-09-02 03:02:19 +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:
@@ -39,6 +39,7 @@ Thanks to: @dathbe.
|
|||||||
- [weather] Fixed handling of empty values in weathergov providers handling of precipitationAmount (#3859)
|
- [weather] Fixed handling of empty values in weathergov providers handling of precipitationAmount (#3859)
|
||||||
- [calendar] Fix regression handling of limit days (#3840)
|
- [calendar] Fix regression handling of limit days (#3840)
|
||||||
- [calendar] Fixed regression of calendarfetcherutils.shouldEventBeExcluded (#3841)
|
- [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
|
## [2.32.0] - 2025-07-01
|
||||||
|
|
||||||
|
@@ -42,7 +42,9 @@ function Server (config) {
|
|||||||
origin: /.*$/,
|
origin: /.*$/,
|
||||||
credentials: true
|
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) => {
|
server.on("connection", (socket) => {
|
||||||
|
@@ -13,7 +13,9 @@ const MMSocket = function (moduleName) {
|
|||||||
base = config.basePath;
|
base = config.basePath;
|
||||||
}
|
}
|
||||||
this.socket = io(`/${this.moduleName}`, {
|
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 () {};
|
let notificationCallback = function () {};
|
||||||
|
Reference in New Issue
Block a user