summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorGravatar Junho Choi <junho@cloudflare.com> 2021-05-10 18:03:06 -0700
committerGravatar Alessandro Ghedini <alessandro@ghedini.me> 2021-05-11 11:47:00 +0100
commitb13e1d1e2105b51fdcef88cbc190317ddd95e1a2 (patch)
treea433fb612292cad827df3b69f8ad5217a5c81ddb /src/lib.rs
parent4f83722db0028d5d2799280983e1989317d74f30 (diff)
downloadquiche-b13e1d1e2105b51fdcef88cbc190317ddd95e1a2.tar.gz
quiche-b13e1d1e2105b51fdcef88cbc190317ddd95e1a2.tar.zst
quiche-b13e1d1e2105b51fdcef88cbc190317ddd95e1a2.zip
use PAYLOAD_LENGTH_LEN const
Diffstat (limited to '')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5feb7da2..9104e54f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2471,7 +2471,7 @@ impl Connection {
// We assume that the payload length, which is only present in long
// header packets, can always be encoded with a 2-byte varint.
if pkt_type != packet::Type::Short {
- overhead += 2;
+ overhead += PAYLOAD_LENGTH_LEN;
}
// Make sure we have enough space left for the packet overhead.