From f05e9fb3f458a6195be1217275d757130d13857a Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Thu, 23 Jul 2020 12:57:13 -0700 Subject: [PATCH] Refine service config error handling --- packages/grpc-js/src/resolving-load-balancer.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/grpc-js/src/resolving-load-balancer.ts b/packages/grpc-js/src/resolving-load-balancer.ts index 43a074806..b467a767c 100644 --- a/packages/grpc-js/src/resolving-load-balancer.ts +++ b/packages/grpc-js/src/resolving-load-balancer.ts @@ -59,9 +59,8 @@ export class ResolvingLoadBalancer implements LoadBalancer { private currentState: ConnectivityState = ConnectivityState.IDLE; /** * The service config object from the last successful resolution, if - * available. A value of undefined indicates that there has not yet - * been a successful resolution, or that the last succesful resolution - * explicitly provided a null service config. + * available. A value of null indicates that we have not yet received a valid + * service config from the resolver. */ private previousServiceConfig: ServiceConfig | null = null; @@ -131,7 +130,7 @@ export class ResolvingLoadBalancer implements LoadBalancer { // Step 4 and 5 if (serviceConfigError === null) { // Step 5 - this.previousServiceConfig = this.defaultServiceConfig; + this.previousServiceConfig = null; workingServiceConfig = this.defaultServiceConfig; } else { // Step 4