chore: 心跳
This commit is contained in:
1 parent
404a213896
commit
e99ff1be35
2 files changed
+18
-6
No files matched your search
@@ -31,7 +31,7 @@ export class OB11ActiveWebSocketAdapter implements IOB11NetworkAdapter {
|
||||
if (this.connection) {
|
||||
this.heartbeatTimer = setInterval(() => {
|
||||
if (this.connection && this.connection.readyState === NodeWebSocket.OPEN) {
|
||||
this.connection.ping(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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user