Shared/Metric: Stop metrics on shutdown

Properly stop metric information gathering and sending on shutdown.
Issue reported by AddressSanitizer.
This commit is contained in:
jackpoz authored and Aokromes committed 2017-12-03 17:12:20 +01:00
1 parent d9501acb3f
commit 84abf3a1a6
1 file changed
+5
+5
View File
@@ -212,7 +212,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()