void ConnectionManagerImpl::onIdleTimeout() {
  ENVOY_CONN_LOG(debug, "idle timeout", read_callbacks_->connection());
  stats_.named_.downstream_cx_idle_timeout_.inc();
  if (!codec_) {
    // No need to delay close after flushing since an idle timeout has already fired. Attempt to
    // write out buffered data one last time and issue a local close if successful.
    doConnectionClose(Network::ConnectionCloseType::FlushWrite, absl::nullopt, "");
  } else if (drain_state_ == DrainState::NotDraining) {
    startDrainSequence();
  }
}
void ConnectionManagerImpl::onIdleTimeout() {
  ENVOY_CONN_LOG(debug, "idle timeout", read_callbacks_->connection());
  stats_.named_.downstream_cx_idle_timeout_.inc();
  if (!codec_) {
     
     
    doConnectionClose(Network::ConnectionCloseType::FlushWrite, absl::nullopt, "");
  } else if (drain_state_ == DrainState::NotDraining) {
    startDrainSequence();
  }
}