Skip to content

Commit

Permalink
Respect congestion control while handshaking
Browse files Browse the repository at this point in the history
Not sure why we weren't doing this, but as far as I can tell it's
required.
  • Loading branch information
Ralith authored and djc committed Sep 25, 2019
1 parent 0dc23af commit 399aa2f
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions quinn-proto/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2755,14 +2755,10 @@ where
}

fn congestion_blocked(&self) -> bool {
if let State::Established = self.state {
self.path
.congestion_window
.saturating_sub(self.in_flight.bytes)
< u64::from(self.mtu)
} else {
false
}
self.path
.congestion_window
.saturating_sub(self.in_flight.bytes)
< u64::from(self.mtu)
}

fn blocked(&self) -> bool {
Expand Down

0 comments on commit 399aa2f

Please sign in to comment.