diff --git a/src/lib/mtproto/networker.ts b/src/lib/mtproto/networker.ts index 0b28dae7..2b67ea08 100644 --- a/src/lib/mtproto/networker.ts +++ b/src/lib/mtproto/networker.ts @@ -184,7 +184,7 @@ export default class MTPNetworker { //private debugRequests: Array<{before: Uint8Array, after: Uint8Array}> = []; private delays: typeof delays[keyof typeof delays]; - private getNewTimeOffset: boolean; + // private getNewTimeOffset: boolean; constructor( public dcId: number, @@ -891,7 +891,7 @@ export default class MTPNetworker { this.sendPingDelayDisconnect(); } - this.getNewTimeOffset = true; + // this.getNewTimeOffset = true; } /* if(this.onConnectionStatusChange) { this.onConnectionStatusChange(this.isOnline); @@ -1672,11 +1672,11 @@ export default class MTPNetworker { this.pingDelayDisconnectDeferred.resolve('any message'); } - let changedTimeOffset: boolean; - if(this.getNewTimeOffset) { - changedTimeOffset = this.applyServerTime(messageId); - this.getNewTimeOffset = undefined; - } + // let changedTimeOffset: boolean; + // if(this.getNewTimeOffset) { + // changedTimeOffset = this.applyServerTime(messageId); + // this.getNewTimeOffset = undefined; + // } switch(message._) { case 'msg_container': { @@ -1719,10 +1719,11 @@ export default class MTPNetworker { case 32: // * msg_seqno too low case 33: // * msg_seqno too high case 64: { // * invalid container - if(changedTimeOffset === undefined) { - changedTimeOffset = this.applyServerTime(messageId); - } + // if(changedTimeOffset === undefined) { + // changedTimeOffset = this.applyServerTime(messageId); + // } + const changedTimeOffset = this.applyServerTime(messageId); if(message.error_code === 17 || changedTimeOffset) { this.log('Update session'); this.updateSession();