diff --git a/common/src/api/websocket-client.ts b/common/src/api/websocket-client.ts index 28da69d9..c63af36e 100644 --- a/common/src/api/websocket-client.ts +++ b/common/src/api/websocket-client.ts @@ -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) {