From 3c676d08363b8ce05b4749b35bcf5f5a5ebe9f92 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 22 May 2020 22:59:49 +0900 Subject: [PATCH] Use ngtcp2_conn_handle_expiry --- src/h2load_quic.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index 5817b13b..5e2fa311 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -485,15 +485,10 @@ int Client::quic_pkt_timeout() { int rv; auto now = timestamp(worker->loop); - if (ngtcp2_conn_loss_detection_expiry(quic.conn) <= now) { - rv = ngtcp2_conn_on_loss_detection_timer(quic.conn, now); - if (rv != 0) { - quic.last_error = quic::err_transport(NGTCP2_ERR_INTERNAL); - return -1; - } - } - if (ngtcp2_conn_ack_delay_expiry(quic.conn) <= now) { - ngtcp2_conn_cancel_expired_ack_delay_timer(quic.conn, now); + rv = ngtcp2_conn_handle_expiry(quic.conn, now); + if (rv != 0) { + quic.last_error = quic::err_transport(NGTCP2_ERR_INTERNAL); + return -1; } return write_quic();