Skip to content

Commit 7d5fef2

Browse files
authored
Use the min rtt for ack-frequency computation (#56)
2 parents ff58f71 + 74d2cc5 commit 7d5fef2

File tree

1 file changed

+6
-3
lines changed
  • quinn-proto/src/connection

1 file changed

+6
-3
lines changed

quinn-proto/src/connection/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,12 @@ impl Connection {
536536
};
537537

538538
// Check whether we need to send an ACK_FREQUENCY frame
539-
// TODO(@divma): decide if we take the min/max/avg something else over all paths because
540-
// this looks wrong for the multipath case
541-
let rtt = self.path_data(path_id).rtt.get();
539+
let rtt = self
540+
.paths
541+
.values()
542+
.map(|p| p.path.rtt.get())
543+
.min()
544+
.expect("one path exists");
542545
if let Some(config) = &self.config.ack_frequency_config {
543546
self.spaces[SpaceId::Data].pending.ack_frequency = self
544547
.ack_frequency

0 commit comments

Comments
 (0)