Skip to content

Commit

Permalink
if our delay measurement exceeds the RTT, adjust the base delay so th…
Browse files Browse the repository at this point in the history
…at our estimate matches the RTT
  • Loading branch information
ghazel committed Feb 9, 2011
1 parent a081cfb commit f517d3a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1965,6 +1965,13 @@ size_t UTP_ProcessIncoming(UTPSocket *conn, const byte *packet, size_t len, bool
}
}
*/

// if the delay estimate exceeds the RTT, adjust the base_delay to
// compensate
if (conn->our_hist.get_value() > uint32(min_rtt)) {
conn->our_hist.shift(conn->our_hist.get_value() - min_rtt);
}

// only apply the congestion controller on acks
// if we don't have a delay measurement, there's
// no point in invoking the congestion control
Expand Down

0 comments on commit f517d3a

Please sign in to comment.