void HttpHealthCheckerImpl::HttpActiveHealthCheckSession::onGoAway(
    Http::GoAwayErrorCode error_code) {
  ENVOY_CONN_LOG(debug, "connection going away goaway_code={}, health_flags={}", *client_,
                 static_cast<int>(error_code), HostUtility::healthFlagsToString(*host_));

  if (request_in_flight_ && error_code == Http::GoAwayErrorCode::NoError) {
    // The server is starting a graceful shutdown. Allow the in flight request
    // to finish without treating this as a health check error, and then
    // reconnect.
    reuse_connection_ = false;
    return;
  }

  if (request_in_flight_) {
    // Record this as a failed health check.
    handleFailure(envoy::data::core::v3::NETWORK);
  }

  if (client_) {
    expect_reset_ = true;
    client_->close();
  }
}
void HttpHealthCheckerImpl::HttpActiveHealthCheckSession::onGoAway(
    Http::GoAwayErrorCode error_code) {
  ENVOY_CONN_LOG(debug, "connection going away goaway_code={}, health_flags={}", *client_,
                 static_cast<int>(error_code), HostUtility::healthFlagsToString(*host_));

  if (request_in_flight_ && error_code == Http::GoAwayErrorCode::NoError) {
     
     
     
    reuse_connection_ = false;
    return;
  }

  if (request_in_flight_) {
     
    handleFailure(envoy::data::core::v3::NETWORK);
  }

  if (client_) {
    expect_reset_ = true;
    client_->close();
  }
}