aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/Metric/Metric.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp
index 10f0d13b688..e208cdc4aec 100644
--- a/src/common/Metric/Metric.cpp
+++ b/src/common/Metric/Metric.cpp
@@ -217,7 +217,12 @@ void Metric::ForceSend()
{
// Send what's queued only if io_service is stopped (so only on shutdown)
if (_enabled && _batchTimer->get_io_service().stopped())
+ {
+ _enabled = false;
SendBatch();
+ _batchTimer->cancel();
+ _overallStatusTimer->cancel();
+ }
}
void Metric::ScheduleOverallStatusLog()