public resetAllServices()

in src/connection-pool.ts [207:221]


  public resetAllServices() {
    for (const service of Object.values(this.cachedServices)) {
      if (service) {
        // workaround: https://github.com/grpc/grpc-node/issues/1487
        const state = service.getChannel().getConnectivityState(false);
        if (state === grpc.connectivityState.CONNECTING) {
          service.waitForReady(Date.now() + 10_00, () => service.close());
        } else {
          service.close();
        }
      }
    }

    this.cachedServices = Object.create(null);
  }