@@ -73,8 +73,7 @@ namespace quic {
7373#define ENDPOINT_CC (V ) \
7474 V (RENO, reno) \
7575 V (CUBIC, cubic) \
76- V (BBR, bbr) \
77- V (BBR2, bbr2)
76+ V (BBR, bbr)
7877
7978struct Endpoint ::State {
8079#define V (_, name, type ) type name;
@@ -427,11 +426,11 @@ int Endpoint::UDP::Bind(const Endpoint::Options& options) {
427426}
428427
429428void Endpoint::UDP::Ref () {
430- if (!is_closed ()) uv_ref (reinterpret_cast <uv_handle_t *>(&impl_->handle_ ));
429+ if (!is_closed_or_closing ()) uv_ref (reinterpret_cast <uv_handle_t *>(&impl_->handle_ ));
431430}
432431
433432void Endpoint::UDP::Unref () {
434- if (!is_closed ()) uv_unref (reinterpret_cast <uv_handle_t *>(&impl_->handle_ ));
433+ if (!is_closed_or_closing ()) uv_unref (reinterpret_cast <uv_handle_t *>(&impl_->handle_ ));
435434}
436435
437436int Endpoint::UDP::Start () {
@@ -476,7 +475,7 @@ Endpoint::UDP::operator bool() const {
476475}
477476
478477SocketAddress Endpoint::UDP::local_address () const {
479- DCHECK (!is_closed () && is_bound ());
478+ DCHECK (!is_closed_or_closing () && is_bound ());
480479 return SocketAddress::FromSockName (impl_->handle_ );
481480}
482481
@@ -1012,7 +1011,7 @@ void Endpoint::Receive(const uv_buf_t& buf,
10121011
10131012 if (options_.validate_address ) {
10141013 // If there is no token, generate and send one.
1015- if (hd.token . len == 0 ) {
1014+ if (hd.tokenlen == 0 ) {
10161015 SendRetry (PathDescriptor{
10171016 version,
10181017 dcid,
@@ -1027,9 +1026,9 @@ void Endpoint::Receive(const uv_buf_t& buf,
10271026
10281027 // We have two kinds of tokens, each prefixed with a different magic
10291028 // byte.
1030- switch (hd.token . base [0 ]) {
1029+ switch (hd.token [0 ]) {
10311030 case RetryToken::kTokenMagic : {
1032- RetryToken token (hd.token . base , hd.token . len );
1031+ RetryToken token (hd.token , hd.tokenlen );
10331032 auto ocid = token.Validate (
10341033 version,
10351034 remote_address,
@@ -1055,7 +1054,7 @@ void Endpoint::Receive(const uv_buf_t& buf,
10551054 break ;
10561055 }
10571056 case RegularToken::kTokenMagic : {
1058- RegularToken token (hd.token . base , hd.token . len );
1057+ RegularToken token (hd.token , hd.tokenlen );
10591058 if (!token.Validate (
10601059 version,
10611060 remote_address,
@@ -1072,8 +1071,8 @@ void Endpoint::Receive(const uv_buf_t& buf,
10721071 // if a retry is sent.
10731072 return true ;
10741073 }
1075- hd.token . base = nullptr ;
1076- hd.token . len = 0 ;
1074+ hd.token = nullptr ;
1075+ hd.tokenlen = 0 ;
10771076 break ;
10781077 }
10791078 default : {
@@ -1093,7 +1092,7 @@ void Endpoint::Receive(const uv_buf_t& buf,
10931092 // so we don't have to do this dance again for this endpoint
10941093 // instance.
10951094 addrLRU_.Upsert (remote_address)->validated = true ;
1096- } else if (hd.token . len > 0 ) {
1095+ } else if (hd.tokenlen > 0 ) {
10971096 // If validation is turned off and there is a token, that's weird.
10981097 // The peer should only have a token if we sent it to them and we
10991098 // wouldn't have sent it unless validation was turned on. Let's
0 commit comments