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