mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-07 01:18:55 +01:00
Core/Logging: Fixed log message order not being preserved when async logging was enabled and ThreadPool was greater than 1
Despite that issue, logging was still threadsafe, just not ordered properly
This commit is contained in:
@@ -238,7 +238,7 @@ void Log::write(std::unique_ptr<LogMessage> msg) const
|
||||
if (_ioContext)
|
||||
{
|
||||
std::shared_ptr<LogOperation> logOperation = std::make_shared<LogOperation>(logger, std::move(msg));
|
||||
Trinity::Asio::post(*_ioContext, Trinity::Asio::bind_executor(*_strand, [logOperation]() { logOperation->call(); }));
|
||||
Trinity::Asio::post(*_strand, [logOperation]() { logOperation->call(); });
|
||||
}
|
||||
else
|
||||
logger->write(msg.get());
|
||||
|
||||
Reference in New Issue
Block a user