| Index: net/quic/test_tools/simulator/simulator.h
|
| diff --git a/net/quic/test_tools/simulator/simulator.h b/net/quic/test_tools/simulator/simulator.h
|
| index ae755a39252ebdc4189d7b338b1d58e045ce4ddb..7b3743bd1681247eaf62fb9621136fdbe8486db0 100644
|
| --- a/net/quic/test_tools/simulator/simulator.h
|
| +++ b/net/quic/test_tools/simulator/simulator.h
|
| @@ -135,13 +135,15 @@ class Simulator : public QuicConnectionHelperInterface {
|
|
|
| template <class TerminationPredicate>
|
| bool Simulator::RunUntil(TerminationPredicate termination_predicate) {
|
| - while (!schedule_.empty()) {
|
| - if (termination_predicate()) {
|
| - return true;
|
| + bool predicate_value = false;
|
| + while (true) {
|
| + predicate_value = termination_predicate();
|
| + if (predicate_value || schedule_.empty()) {
|
| + break;
|
| }
|
| HandleNextScheduledActor();
|
| }
|
| - return false;
|
| + return predicate_value;
|
| }
|
|
|
| template <class TerminationPredicate>
|
|
|