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 && |