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

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

Issue 411823002: Land Recent QUIC Changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase TOT Created 6 years, 5 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
« no previous file with comments | « net/quic/congestion_control/send_algorithm_interface.cc ('k') | net/quic/crypto/crypto_protocol.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5c55f5b5d69d225486d7daefe22ba0592924bc76..36aa32163d9356d54225c27607cd641e3d1103ba 100644
--- a/net/quic/congestion_control/send_algorithm_simulator.cc
+++ b/net/quic/congestion_control/send_algorithm_simulator.cc
@@ -73,7 +73,9 @@ void SendAlgorithmSimulator::TransferBytes() {
void SendAlgorithmSimulator::TransferBytes(QuicByteCount max_bytes,
QuicTime::Delta max_time) {
- const QuicTime end_time = clock_->Now().Add(max_time);
+ const QuicTime end_time = max_time.IsInfinite() ?
+ QuicTime::Zero().Add(QuicTime::Delta::Infinite()) :
+ clock_->Now().Add(max_time);
QuicByteCount bytes_sent = 0;
while (!pending_transfers_.empty() &&
clock_->Now() < end_time &&
« no previous file with comments | « net/quic/congestion_control/send_algorithm_interface.cc ('k') | net/quic/crypto/crypto_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698