diff --git a/src/shrpx_http3_upstream.cc b/src/shrpx_http3_upstream.cc index c0443700..9ed1a8cf 100644 --- a/src/shrpx_http3_upstream.cc +++ b/src/shrpx_http3_upstream.cc @@ -1330,10 +1330,9 @@ void Http3Upstream::on_handler_delete() { auto worker = handler_->get_worker(); auto quic_conn_handler = worker->get_quic_connection_handler(); - quic_conn_handler->remove_connection_id(&hashed_scid_); - - std::vector scids(ngtcp2_conn_get_num_scid(conn_)); + std::vector scids(ngtcp2_conn_get_num_scid(conn_) + 1); ngtcp2_conn_get_scid(conn_, scids.data()); + scids.back() = hashed_scid_; for (auto &cid : scids) { quic_conn_handler->remove_connection_id(&cid);