Skip to content

Commit 6f90c28

Browse files
committed
avoid reauth on tokenExpired or reconnecting when a websocketRenewal is in progress
1 parent 6f32487 commit 6f90c28

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Kuzzle.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,9 @@ export class Kuzzle extends KuzzleEventEmitter {
581581

582582
this.protocol.addListener('discarded', data => this.emit('discarded', data));
583583

584+
this.protocol.addListener('websocketRenewalStart', () => { this._reconnectInProgress = true; });
585+
this.protocol.addListener('websocketRenewalDone', () => { this._reconnectInProgress = false; });
586+
584587
return this.protocol.connect();
585588
}
586589

0 commit comments

Comments
 (0)