nghttpx: Use ngtcp2_conn_get_client_initial_dcid
This commit is contained in:
parent
fb53a6a686
commit
2afad0c650
|
@ -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,
|
||||||
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,
|
||||||
|
|
||||||
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:
|
||||||
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_;
|
||||||
|
|
Loading…
Reference in New Issue