mirror of
https://github.com/zhigang1992/mtcute.git
synced 2026-01-12 22:49:02 +08:00
fix(core): hopefully fix infinite reconnect after closing
This commit is contained in:
@@ -1692,7 +1692,9 @@ export class SessionConnection extends PersistentConnection {
|
||||
if (now - this._session.lastPingTime > this._pingInterval) {
|
||||
if (!this._session.lastPingMsgId.isZero()) {
|
||||
this.log.warn("didn't receive pong for previous ping (msg_id = %l). are we offline?", this._session.lastPingMsgId)
|
||||
if (!this._disconnectedManually) {
|
||||
this._resetSession('ping timeout')
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user