This commit is contained in:
手瓜一十雪 2024-08-11 23:37:31 +08:00
parent d748d6e400
commit fb8e0595c2

View File

@ -71,7 +71,7 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
private registerHeartBeat() { private registerHeartBeat() {
if (this.connection) { if (this.connection) {
this.heartbeatTimer = setInterval(() => { this.heartbeatTimer = setInterval(() => {
if (this.connection && this.connection.readyState === NodeWebSocket.OPEN) { if (this.connection && this.connection.readyState === WebSocket.OPEN) {
this.connection.send(JSON.stringify(new OB11HeartbeatEvent(this.coreContext, this.heartbeatInterval, this.coreContext.selfInfo.online, true))); this.connection.send(JSON.stringify(new OB11HeartbeatEvent(this.coreContext, this.heartbeatInterval, this.coreContext.selfInfo.online, true)));
} }
}, this.heartbeatInterval); }, this.heartbeatInterval);