grpc-js: Add null check in pick_first array access

This commit is contained in:
Michael Lumish 2023-08-08 10:37:20 -07:00
parent f6dd4aad55
commit a4ba925352
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ export class PickFirstLoadBalancer implements LoadBalancer {
this.children[subchannelIndex].subchannel.getAddress()
);
process.nextTick(() => {
this.children[subchannelIndex].subchannel.startConnecting();
this.children[subchannelIndex]?.subchannel.startConnecting();
});
}
this.connectionDelayTimeout = setTimeout(() => {