docs: synchronized int cleanPools() {
          int totalConnectionsRemaining = 0;
          List<String> hostsToRemove = new ArrayList<String>();
          for (Map.Entry<String, TransportPool> hostPool : hostPools.entrySet()) {
              String host = hostPool.getKey();
              TransportPool pool = hostPool.getValue();
  
              int connectionsRemaining = pool.removeOldConnections();
              if (connectionsRemaining == 0) {
                  hostsToRemove.add(host);
              } else {
                  totalConnectionsRemaining += connectionsRemaining;
              }
          }
  
          // Remove old pools that now have no connections.
          for (String hostToRemove : hostsToRemove) {
              hostPools.remove(hostToRemove);
          }
  
          return totalConnectionsRemaining;
      }