mirror of https://github.com/grpc/grpc-node.git
Merge pull request #2626 from murgatroid99/grpc-js_call_timer_ref_fix
grpc-js: Fix call ref timer handling
This commit is contained in:
commit
9890d59073
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@grpc/grpc-js",
|
||||
"version": "1.9.12",
|
||||
"version": "1.9.13",
|
||||
"description": "gRPC Library for Node - pure JS implementation",
|
||||
"homepage": "https://grpc.io/",
|
||||
"repository": "https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",
|
||||
|
|
|
@ -296,7 +296,9 @@ export class InternalChannel {
|
|||
this.currentPicker = picker;
|
||||
const queueCopy = this.pickQueue.slice();
|
||||
this.pickQueue = [];
|
||||
this.callRefTimerUnref();
|
||||
if (queueCopy.length > 0) {
|
||||
this.callRefTimerUnref();
|
||||
}
|
||||
for (const call of queueCopy) {
|
||||
call.doPick();
|
||||
}
|
||||
|
@ -349,11 +351,12 @@ export class InternalChannel {
|
|||
process.nextTick(() => {
|
||||
const localQueue = this.configSelectionQueue;
|
||||
this.configSelectionQueue = [];
|
||||
this.callRefTimerUnref();
|
||||
if (localQueue.length > 0) {
|
||||
this.callRefTimerUnref();
|
||||
}
|
||||
for (const call of localQueue) {
|
||||
call.getConfig();
|
||||
}
|
||||
this.configSelectionQueue = [];
|
||||
});
|
||||
},
|
||||
status => {
|
||||
|
@ -380,7 +383,9 @@ export class InternalChannel {
|
|||
}
|
||||
const localQueue = this.configSelectionQueue;
|
||||
this.configSelectionQueue = [];
|
||||
this.callRefTimerUnref();
|
||||
if (localQueue.length > 0) {
|
||||
this.callRefTimerUnref();
|
||||
}
|
||||
for (const call of localQueue) {
|
||||
call.reportResolverError(status);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue