Connection state #22

Merged
teidesu merged 3 commits from connection-state into master 2024-03-15 03:45:03 +03:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit c9a4558e5c - Show all commits

View file

@ -35,7 +35,7 @@ export abstract class PersistentConnection extends EventEmitter {
private _previousWait: number | null = null
private _reconnectionTimeout: NodeJS.Timeout | null = null
private _shouldReconnectImmediately = false
private _disconnectedManually = false
protected _disconnectedManually = false
// inactivity timeout
private _inactivityTimeout: NodeJS.Timeout | null = null

View file

@ -1524,14 +1524,14 @@ export class SessionConnection extends PersistentConnection {
private _flush(): void {
if (
!this.isConnected ||
this._disconnectedManually ||
!this._session._authKey.ready ||
this._isPfsBindingPending ||
this._session.current429Timeout
) {
this.log.debug(
'skipping flush, connection is not usable (connected = %b, auth key ready = %b, pfs binding pending = %b, 429 timeout = %b)',
this.isConnected,
'skipping flush, connection is not usable (offline = %b, auth key ready = %b, pfs binding pending = %b, 429 timeout = %b)',
this._disconnectedManually,
this._session._authKey.ready,
this._isPfsBindingPending,
this._session.current429Timeout,