From 49e57a2f41df3fa042d7e2ba8011ffe5031172c9 Mon Sep 17 00:00:00 2001 From: Matthias Einwag Date: Wed, 20 Jan 2021 19:15:22 +0000 Subject: [PATCH] Use all tokens for pacing There is no need for leaving the last token inside the bucket unused. --- quinn-proto/src/connection/pacing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quinn-proto/src/connection/pacing.rs b/quinn-proto/src/connection/pacing.rs index a237701f9..0e0074a07 100644 --- a/quinn-proto/src/connection/pacing.rs +++ b/quinn-proto/src/connection/pacing.rs @@ -48,7 +48,7 @@ impl Pacer { ); // if we can already send a packet, there is no need for delay - if self.tokens > mtu.into() { + if self.tokens >= mtu.into() { return None; }