code: private void addLoadBalancerListener() {
          if (!(lbContext.getLoadBalancer() instanceof BaseLoadBalancer)) {
              return;
          }
          
          ((BaseLoadBalancer) lbContext.getLoadBalancer()).addServerListChangeListener(new ServerListChangeListener() {
              @Override
              public void serverListChanged(List<Server> oldList, List<Server> newList) {
                  Set<Server> removedServers = new HashSet<Server>(oldList);
                  removedServers.removeAll(newList);
                  for (Server server: rxClientCache.keySet()) {
                      if (removedServers.contains(server)) {
                          // this server is no longer in UP status
                          removeClient(server);
                      }
                  }
              }
          });
      }
docs: Add a listener that is responsible for removing an HttpClient and shutting down
  its connection pool if it is no longer available from load balancer.