void ActiveClient::drain() {
  if (currentUnusedCapacity() <= 0) {
    return;
  }
  if (state() == ActiveClient::State::CONNECTING) {
    // If connecting, update both the cluster capacity and the local connecting
    // capacity.
    parent_.decrConnectingAndConnectedStreamCapacity(currentUnusedCapacity());
  } else {
    parent_.state().decrConnectingAndConnectedStreamCapacity(currentUnusedCapacity());
  }

  remaining_streams_ = 0;
}
void ActiveClient::drain() {
  if (currentUnusedCapacity() <= 0) {
    return;
  }
  if (state() == ActiveClient::State::CONNECTING) {
     
     
    parent_.decrConnectingAndConnectedStreamCapacity(currentUnusedCapacity());
  } else {
    parent_.state().decrConnectingAndConnectedStreamCapacity(currentUnusedCapacity());
  }

  remaining_streams_ = 0;
}