mirror of https://github.com/grpc/grpc-node.git
grpc-js: Fix reentrancy problem in backoff timer callback
This commit is contained in:
parent
02b7c27e96
commit
bd3bbe1294
|
@ -132,8 +132,8 @@ export class BackoffTimeout {
|
||||||
clearTimeout(this.timerId);
|
clearTimeout(this.timerId);
|
||||||
this.timerId = setTimeout(() => {
|
this.timerId = setTimeout(() => {
|
||||||
this.trace('timer fired');
|
this.trace('timer fired');
|
||||||
this.callback();
|
|
||||||
this.running = false;
|
this.running = false;
|
||||||
|
this.callback();
|
||||||
}, delay);
|
}, delay);
|
||||||
if (!this.hasRef) {
|
if (!this.hasRef) {
|
||||||
this.timerId.unref?.();
|
this.timerId.unref?.();
|
||||||
|
|
Loading…
Reference in New Issue