Compile with the latest ngtcp2
This commit is contained in:
parent
02e6cad121
commit
d91ae6987d
|
@ -535,12 +535,12 @@ void Client::quic_close_connection() {
|
||||||
case quic::ErrorType::Transport:
|
case quic::ErrorType::Transport:
|
||||||
nwrite = ngtcp2_conn_write_connection_close(
|
nwrite = ngtcp2_conn_write_connection_close(
|
||||||
quic.conn, &ps.path, nullptr, buf.data(), buf.size(),
|
quic.conn, &ps.path, nullptr, buf.data(), buf.size(),
|
||||||
quic.last_error.code, timestamp(worker->loop));
|
quic.last_error.code, nullptr, 0, timestamp(worker->loop));
|
||||||
break;
|
break;
|
||||||
case quic::ErrorType::Application:
|
case quic::ErrorType::Application:
|
||||||
nwrite = ngtcp2_conn_write_application_close(
|
nwrite = ngtcp2_conn_write_application_close(
|
||||||
quic.conn, &ps.path, nullptr, buf.data(), buf.size(),
|
quic.conn, &ps.path, nullptr, buf.data(), buf.size(),
|
||||||
quic.last_error.code, timestamp(worker->loop));
|
quic.last_error.code, nullptr, 0, timestamp(worker->loop));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
|
@ -1406,7 +1406,7 @@ void Http3Upstream::on_handler_delete() {
|
||||||
|
|
||||||
auto nwrite = ngtcp2_conn_write_connection_close(
|
auto nwrite = ngtcp2_conn_write_connection_close(
|
||||||
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
|
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
|
||||||
NGTCP2_NO_ERROR, quic_timestamp());
|
NGTCP2_NO_ERROR, nullptr, 0, quic_timestamp());
|
||||||
if (nwrite < 0) {
|
if (nwrite < 0) {
|
||||||
if (nwrite != NGTCP2_ERR_INVALID_STATE) {
|
if (nwrite != NGTCP2_ERR_INVALID_STATE) {
|
||||||
ULOG(ERROR, this) << "ngtcp2_conn_write_connection_close: "
|
ULOG(ERROR, this) << "ngtcp2_conn_write_connection_close: "
|
||||||
|
@ -1764,7 +1764,7 @@ int Http3Upstream::handle_error() {
|
||||||
if (last_error_.type == quic::ErrorType::Transport) {
|
if (last_error_.type == quic::ErrorType::Transport) {
|
||||||
nwrite = ngtcp2_conn_write_connection_close(
|
nwrite = ngtcp2_conn_write_connection_close(
|
||||||
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
|
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
|
||||||
last_error_.code, ts);
|
last_error_.code, nullptr, 0, ts);
|
||||||
if (nwrite < 0) {
|
if (nwrite < 0) {
|
||||||
ULOG(ERROR, this) << "ngtcp2_conn_write_connection_close: "
|
ULOG(ERROR, this) << "ngtcp2_conn_write_connection_close: "
|
||||||
<< ngtcp2_strerror(nwrite);
|
<< ngtcp2_strerror(nwrite);
|
||||||
|
@ -1773,7 +1773,7 @@ int Http3Upstream::handle_error() {
|
||||||
} else {
|
} else {
|
||||||
nwrite = ngtcp2_conn_write_application_close(
|
nwrite = ngtcp2_conn_write_application_close(
|
||||||
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
|
conn_, &ps.path, &pi, conn_close_.data(), conn_close_.size(),
|
||||||
last_error_.code, ts);
|
last_error_.code, nullptr, 0, ts);
|
||||||
if (nwrite < 0) {
|
if (nwrite < 0) {
|
||||||
ULOG(ERROR, this) << "ngtcp2_conn_write_application_close: "
|
ULOG(ERROR, this) << "ngtcp2_conn_write_application_close: "
|
||||||
<< ngtcp2_strerror(nwrite);
|
<< ngtcp2_strerror(nwrite);
|
||||||
|
|
|
@ -615,7 +615,8 @@ int QUICConnectionHandler::send_connection_close(
|
||||||
std::array<uint8_t, NGTCP2_MAX_UDP_PAYLOAD_SIZE> buf;
|
std::array<uint8_t, NGTCP2_MAX_UDP_PAYLOAD_SIZE> buf;
|
||||||
|
|
||||||
auto nwrite = ngtcp2_crypto_write_connection_close(
|
auto nwrite = ngtcp2_crypto_write_connection_close(
|
||||||
buf.data(), buf.size(), version, &ini_scid, &ini_dcid, error_code);
|
buf.data(), buf.size(), version, &ini_scid, &ini_dcid, error_code,
|
||||||
|
nullptr, 0);
|
||||||
if (nwrite < 0) {
|
if (nwrite < 0) {
|
||||||
LOG(ERROR) << "ngtcp2_crypto_write_connection_close failed";
|
LOG(ERROR) << "ngtcp2_crypto_write_connection_close failed";
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue