Commit 2afad0c6 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Use ngtcp2_conn_get_client_initial_dcid

parent fb53a6a6
...@@ -149,7 +149,8 @@ Http3Upstream::~Http3Upstream() { ...@@ -149,7 +149,8 @@ Http3Upstream::~Http3Upstream() {
auto worker = handler_->get_worker(); auto worker = handler_->get_worker();
auto quic_client_handler = worker->get_quic_connection_handler(); auto quic_client_handler = worker->get_quic_connection_handler();
quic_client_handler->remove_connection_id(&initial_client_dcid_); quic_client_handler->remove_connection_id(
ngtcp2_conn_get_client_initial_dcid(conn_));
std::vector<ngtcp2_cid> scids(ngtcp2_conn_get_num_scid(conn_)); std::vector<ngtcp2_cid> scids(ngtcp2_conn_get_num_scid(conn_));
ngtcp2_conn_get_scid(conn_, scids.data()); ngtcp2_conn_get_scid(conn_, scids.data());
...@@ -516,8 +517,6 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr, ...@@ -516,8 +517,6 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
shrpx::stream_stop_sending, shrpx::stream_stop_sending,
}; };
initial_client_dcid_ = initial_hd.dcid;
ngtcp2_cid scid; ngtcp2_cid scid;
if (generate_quic_connection_id(&scid, SHRPX_QUIC_SCIDLEN, if (generate_quic_connection_id(&scid, SHRPX_QUIC_SCIDLEN,
...@@ -592,7 +591,7 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr, ...@@ -592,7 +591,7 @@ int Http3Upstream::init(const UpstreamAddr *faddr, const Address &remote_addr,
auto quic_connection_handler = worker->get_quic_connection_handler(); auto quic_connection_handler = worker->get_quic_connection_handler();
quic_connection_handler->add_connection_id(&initial_client_dcid_, handler_); quic_connection_handler->add_connection_id(&initial_hd.dcid, handler_);
quic_connection_handler->add_connection_id(&scid, handler_); quic_connection_handler->add_connection_id(&scid, handler_);
return 0; return 0;
......
...@@ -154,7 +154,6 @@ private: ...@@ -154,7 +154,6 @@ private:
ev_timer idle_timer_; ev_timer idle_timer_;
ev_timer shutdown_timer_; ev_timer shutdown_timer_;
ev_prepare prep_; ev_prepare prep_;
ngtcp2_cid initial_client_dcid_;
ngtcp2_conn *conn_; ngtcp2_conn *conn_;
quic::Error last_error_; quic::Error last_error_;
uint8_t tls_alert_; uint8_t tls_alert_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment