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

Unified Diff: net/quic/test_tools/simulator/simulator.h

Issue 2430973004: Landing Recent QUIC changes until 10:38 AM, Oct 17, 2016 UTC-4 (Closed)
Patch Set: Improving flagsaver logging Created 4 years, 2 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/test_tools/quic_test_utils.cc ('k') | net/quic/test_tools/simulator/simulator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/quic/test_tools/simulator/simulator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698