summaryrefslogtreecommitdiffstats
path: root/net/quic/congestion_control/send_algorithm_simulator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/quic/congestion_control/send_algorithm_simulator.cc')
-rw-r--r--net/quic/congestion_control/send_algorithm_simulator.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/quic/congestion_control/send_algorithm_simulator.cc b/net/quic/congestion_control/send_algorithm_simulator.cc
index 5c55f5b..36aa321 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 &&