Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: net/quic/congestion_control/send_algorithm_simulator.cc

Issue 355573007: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added NET_EXPORT_PRIVATE for ContainsQuicTag Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/congestion_control/send_algorithm_simulator.cc
diff --git a/net/quic/congestion_control/send_algorithm_simulator.cc b/net/quic/congestion_control/send_algorithm_simulator.cc
index d539013c10e1109b5f6eaba3c229ed74ed7d6fb5..3b8ca70a8ad7d8bb93b42f7756e8daa7d766a8e2 100644
--- a/net/quic/congestion_control/send_algorithm_simulator.cc
+++ b/net/quic/congestion_control/send_algorithm_simulator.cc
@@ -238,8 +238,8 @@ void SendAlgorithmSimulator::SendDataNow() {
// If the number of bytes in flight are less than the bdp, there's
// no buffering delay. Bytes lost from the buffer are not counted.
QuicByteCount bdp = bandwidth_.ToBytesPerPeriod(rtt_);
- if (sent_packets_.size() * kPacketSize > bdp) {
- QuicByteCount qsize = sent_packets_.size() * kPacketSize - bdp;
+ if ((sent_packets_.size() + 1) * kPacketSize > bdp) {
+ QuicByteCount qsize = (sent_packets_.size() + 1) * kPacketSize - bdp;
ack_time = ack_time.Add(bandwidth_.TransferTime(qsize));
}
// If the packet is lost, give it an ack time of Zero.
« no previous file with comments | « net/quic/congestion_control/send_algorithm_interface.h ('k') | net/quic/congestion_control/tcp_cubic_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698