Skip to content

Commit

Permalink
fix(query-orchestartor): Queue - fix possible memory leak with timer (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr authored Nov 28, 2023
1 parent 4a08de5 commit 535a676
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,11 @@ export class QueryQueue {
await this.sendCancelMessageFn(queryWithCancelHandle, queueId);
}
}
} finally {
// catch block can throw an exception, it's why it's important to clearInterval here
clearInterval(heartBeatTimer);
}

clearInterval(heartBeatTimer);

if (!(await queueConnection.setResultAndRemoveQuery(queryKeyHashed, executionResult, processingId, queueId))) {
this.logger('Orphaned execution result', {
queueId,
Expand Down

0 comments on commit 535a676

Please sign in to comment.