void HTTPSession::drainImpl() {
  if (codec_->isReusable() || codec_->isWaitingToDrain()) {
    setCloseReason(ConnectionCloseReason::SHUTDOWN);
    // For HTTP/2, if we haven't started yet then we cannot send a GOAWAY frame
    // since we haven't sent the initial SETTINGS frame. Defer sending that
    // GOAWAY until the initial SETTINGS is sent.
    if (started_) {
      codec_->generateGoaway(writeBuf_,
                             getGracefulGoawayAck(),
                             ErrorCode::NO_ERROR);
      scheduleWrite();
    }
  }
}
void HTTPSession::drainImpl() {
  if (codec_->isReusable() || codec_->isWaitingToDrain()) {
    setCloseReason(ConnectionCloseReason::SHUTDOWN);
     
     
     
    if (started_) {
      codec_->generateGoaway(writeBuf_,
                             getGracefulGoawayAck(),
                             ErrorCode::NO_ERROR);
      scheduleWrite();
    }
  }
}