Use a better default cid len if missing

It probably is never missing, but still nice to write like this
This commit is contained in:
Floris Bruynooghe
2025-02-27 15:59:57 +01:00
parent d17f9342fd
commit 11a42b8ff2
+2 -2
View File
@@ -4024,7 +4024,7 @@ impl Connection {
.rem_cids
.get(&path)
.map(|cids| cids.active().len())
.unwrap_or_default()
.unwrap_or(20) // Max CID len in QUIC v1
+ pn_len
+ self.tag_len_1rtt()
}
@@ -4037,7 +4037,7 @@ impl Connection {
.values()
.map(|cids| cids.active().len())
.max()
.unwrap_or_default();
.unwrap_or(20); // Max CID len in QUIC v1
// 1 byte for flags
1 + cid_len + pn_len + self.tag_len_1rtt()