fix(core): hopefully fix infinite reconnect after closing

This commit is contained in:
alina sireneva
2025-04-07 04:58:54 +03:00
parent b4d6361f13
commit 46a1716154

View File

@@ -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)
this._resetSession('ping timeout')
if (!this._disconnectedManually) {
this._resetSession('ping timeout')
}
return
}