This commit is contained in:
AlexandreRouma
2025-11-05 03:31:14 -05:00
parent b1b8d1cd40
commit 63766e9d39

View File

@@ -74,14 +74,6 @@ class WisCastUserAPIClient {
dispID: dispID, dispID: dispID,
otp: OTP otp: OTP
})) }))
// Send a heart-beat message every 30 seconds
setInterval(async () => {
console.log("Sending a heart beat");
await this.#sock.send(JSON.stringify({
type: 'hb',
}))
}, 30000);
}); });
} }
@@ -128,7 +120,14 @@ class WisCastUserAPIClient {
await this.#sock.send(JSON.stringify({ await this.#sock.send(JSON.stringify({
type: 'init', type: 'init',
clientType: 'user' clientType: 'user'
})) }));
// Send a heart-beat message every 30 seconds
setInterval(async () => {
await this.#sock.send(JSON.stringify({
type: 'hb',
}))
}, 30000);
} }
async #messageHandler(event) { async #messageHandler(event) {