Skip to content

Commit

Permalink
Reapply current JWT before executing offlineQueue requests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebouthinon committed May 17, 2024
1 parent 78ee3e1 commit 0d7cfaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Kuzzle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,9 @@ Discarded request: ${JSON.stringify(request)}`)
const uniqueQueue = {},
dequeuingProcess = () => {
if (this.offlineQueue.length > 0) {
// Reapply the jwt to the request since it could have been expired
this.offlineQueue[0].request.jwt = this.jwt;

this._timeoutRequest(
this.offlineQueue[0].timeout,
this.offlineQueue[0].request
Expand Down

0 comments on commit 0d7cfaf

Please sign in to comment.