From 044d7f0c4a196b197aac73d133fc5583673bef60 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Wed, 10 Mar 2021 22:06:28 -0800 Subject: [PATCH] Don't issue flow control credit for streams with known size A stream's size is only known after we've issued at least that much flow control credit, so the peer necessarily won't need any more. Our logic to schedule credit issuing already uses similar judgement, so this brings the last-minute sanity check into alignment. --- quinn-proto/src/connection/streams/state.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quinn-proto/src/connection/streams/state.rs b/quinn-proto/src/connection/streams/state.rs index 1a66d2492..d1b83b247 100644 --- a/quinn-proto/src/connection/streams/state.rs +++ b/quinn-proto/src/connection/streams/state.rs @@ -381,7 +381,7 @@ impl StreamsState { Some(x) => x, None => continue, }; - if !rs.is_receiving() { + if !rs.receiving_unknown_size() { continue; } retransmits.get_or_create().max_stream_data.insert(id);