aboutsummaryrefslogtreecommitdiff
path: root/src/common/Metric/Metric.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Metric/Metric.cpp')
-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 27e8996f112..45893fc1b14 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 IoContext is stopped (so only on shutdown)
if (_enabled && Trinity::Asio::get_io_context(*_batchTimer).stopped())
+ {
+ _enabled = false;
SendBatch();
+ _batchTimer->cancel();
+ _overallStatusTimer->cancel();
+ }
}
void Metric::ScheduleOverallStatusLog()