mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Shared/Metric: Stop metrics on shutdown
Properly stop metric information gathering and sending on shutdown. Issue reported by AddressSanitizer.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user