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

Unified Diff: net/quic/quic_alarm.cc

Issue 1781073002: Only cancel QUIC alarms if they have been set. Protected behind FLAG_quic_only_cancel_set_alarms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116134765
Patch Set: Created 4 years, 9 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 | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_alarm.cc
diff --git a/net/quic/quic_alarm.cc b/net/quic/quic_alarm.cc
index b978a146d2e673eee8c9d59fef5a5f4348b56d16..e1f0384138c767dd0a1be416be6932525e5a2e5d 100644
--- a/net/quic/quic_alarm.cc
+++ b/net/quic/quic_alarm.cc
@@ -5,6 +5,7 @@
#include "net/quic/quic_alarm.h"
#include "base/logging.h"
+#include "net/quic/quic_flags.h"
namespace net {
@@ -21,6 +22,10 @@ void QuicAlarm::Set(QuicTime deadline) {
}
void QuicAlarm::Cancel() {
+ if (FLAGS_quic_only_cancel_set_alarms && !IsSet()) {
+ // Don't try to cancel an alarm that hasn't been set.
+ return;
+ }
deadline_ = QuicTime::Zero();
CancelImpl();
}
« no previous file with comments | « no previous file | net/quic/quic_flags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698