diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/Metric/Metric.cpp | 5 |
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() |