This commit is contained in:
MartinBraquet
2025-10-09 18:02:15 +02:00
parent a77e7b96b7
commit 13b13b1104

View File

@@ -93,7 +93,7 @@ export class APIRealtimeClient {
// Send a heartbeat ping every 25s
this.heartbeat = window.setInterval(() => {
if (this.ws.readyState === WebSocket.OPEN) {
this.ws.send(JSON.stringify({ type: "ping" }));
this.sendMessage('ping', {}).catch(console.error);
}
}, 25000);
if (this.subscriptions.size > 0) {