Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

fix: websocket is not keep alive (#2131)

Meier Lukasaf1f8eaf7606
diff --git a/apps/websocket/src/main.ts b/apps/websocket/src/main.ts
index ee742c58c..f819c3dff 100644
--- a/apps/websocket/src/main.ts
+++ b/apps/websocket/src/main.ts
@@ -39,6 +39,14 @@ const handler = applyWSSHandler({
});
}
},
+ // Enable heartbeat messages to keep connection open (disabled by default)
+ keepAlive: {
+ enabled: true,
+ // server ping message interval in milliseconds
+ pingMs: 30000,
+ // connection is terminated if pong message is not received in this many milliseconds
+ pongWaitMs: 5000,
+ },
});
wss.on("connection", (websocket, incomingMessage) => {