grpc-js: Fix reentrancy problem in backoff timer callback

This commit is contained in:
Michael Lumish 2025-03-11 13:54:42 -07:00
parent 02b7c27e96
commit bd3bbe1294
1 changed files with 1 additions and 1 deletions

View File

@ -132,8 +132,8 @@ export class BackoffTimeout {
clearTimeout(this.timerId);
this.timerId = setTimeout(() => {
this.trace('timer fired');
this.callback();
this.running = false;
this.callback();
}, delay);
if (!this.hasRef) {
this.timerId.unref?.();