Skip to content

Commit

Permalink
Wake up a stream only if stream window is not empty
Browse files Browse the repository at this point in the history
This avoids a wakeup in case the connection window increased but the
stream window is still empty.
  • Loading branch information
Matthias Einwag authored and djc committed Mar 2, 2021
1 parent f16db0b commit 5d4352a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quinn-proto/src/connection/streams/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ impl StreamsState {

// If it's no longer sensible to write to a stream (even to detect an error) then don't
// report it.
if stream.is_writable() {
if stream.is_writable() && stream.max_data > stream.offset() {
return Some(StreamEvent::Writable { id });
}
}
Expand Down

0 comments on commit 5d4352a

Please sign in to comment.