diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/Metric/Metric.cpp | 7 | ||||
| -rw-r--r-- | src/common/Metric/Metric.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp index e208cdc4aec..8ef90971808 100644 --- a/src/common/Metric/Metric.cpp +++ b/src/common/Metric/Metric.cpp @@ -213,16 +213,17 @@ void Metric::ScheduleSend() } } -void Metric::ForceSend() +void Metric::Unload() { // 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(); } + + _batchTimer->cancel(); + _overallStatusTimer->cancel(); } void Metric::ScheduleOverallStatusLog() diff --git a/src/common/Metric/Metric.h b/src/common/Metric/Metric.h index 49347ffe1b7..720fc4a2de7 100644 --- a/src/common/Metric/Metric.h +++ b/src/common/Metric/Metric.h @@ -115,7 +115,7 @@ public: void LogEvent(std::string const& category, std::string const& title, std::string const& description); - void ForceSend(); + void Unload(); bool IsEnabled() const { return _enabled; } }; |
