Исправление переподключений
This commit is contained in:
@@ -65,10 +65,11 @@ export default class Protocol extends EventEmitter {
|
||||
}
|
||||
|
||||
public startHeartbeat(intervalS : number) {
|
||||
let _this = this;
|
||||
const heartbeat = () => {
|
||||
if(this.socket && this.socket.readyState === WebSocket.OPEN){
|
||||
if(_this.socket && _this.socket.readyState === WebSocket.OPEN){
|
||||
console.info("HEARTBEAT");
|
||||
this.socket?.send('heartbeat');
|
||||
_this.socket?.send('heartbeat');
|
||||
}
|
||||
}
|
||||
if(this.heartbeatIntervalTimer){
|
||||
|
||||
Reference in New Issue
Block a user