Исправление ошибки с цикличным реконнектом из-за стрелочной функции

This commit is contained in:
RoyceDa
2026-02-01 01:07:58 +02:00
parent 012a561471
commit 22dd15be00

View File

@@ -52,13 +52,13 @@ export default class Protocol extends EventEmitter {
_this.emit('handshake_complete'); _this.emit('handshake_complete');
_this.handshakeExchangeComplete = true; _this.handshakeExchangeComplete = true;
_this._flushPacketQueue(); _this._flushPacketQueue();
this.startHeartbeat(packet.getHeartbeatInterval()); _this.startHeartbeat(packet.getHeartbeatInterval());
} }
if(packet.getHandshakeState() == HandshakeState.NEED_DEVICE_VERIFICATION) { if(packet.getHandshakeState() == HandshakeState.NEED_DEVICE_VERIFICATION) {
console.info('[protocol] %chandshake exchange need device verification', 'color: orange;'); console.info('[protocol] %chandshake exchange need device verification', 'color: orange;');
_this.emit('handshake_need_device_verification'); _this.emit('handshake_need_device_verification');
_this._packetQueue = []; _this._packetQueue = [];
this.startHeartbeat(packet.getHeartbeatInterval()); _this.startHeartbeat(packet.getHeartbeatInterval());
} }
}); });