summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds/statsd/src/metrics/MetricProducer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmds/statsd/src/metrics/MetricProducer.cpp b/cmds/statsd/src/metrics/MetricProducer.cpp
index 0e3cde5364b1..92752b29ecda 100644
--- a/cmds/statsd/src/metrics/MetricProducer.cpp
+++ b/cmds/statsd/src/metrics/MetricProducer.cpp
@@ -174,7 +174,9 @@ void MetricProducer::loadActiveMetricLocked(const ActiveMetric& activeMetric,
continue;
}
auto& activation = it->second;
- if (activeEventActivation.state() == ActiveEventActivation::ACTIVE) {
+ // If the event activation does not have a state, assume it is active.
+ if (!activeEventActivation.has_state() ||
+ activeEventActivation.state() == ActiveEventActivation::ACTIVE) {
// We don't want to change the ttl for future activations, so we set the start_ns
// such that start_ns + ttl_ns == currentTimeNs + remaining_ttl_nanos
activation->start_ns =