From b13e1d1e2105b51fdcef88cbc190317ddd95e1a2 Mon Sep 17 00:00:00 2001 From: Junho Choi Date: Mon, 10 May 2021 18:03:06 -0700 Subject: use PAYLOAD_LENGTH_LEN const --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib.rs') 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. -- cgit v1.2.3