summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
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.