mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 13:37:02 +00:00
Eliminate race condition in World Log.
In has been introduced with multithreaded packet processing, and prevents the dump from being written correctly, e.g. with tools.
This commit is contained in:
parent
19e03b0890
commit
e45969b9ec
2 changed files with 3 additions and 0 deletions
|
|
@ -717,6 +717,8 @@ void Log::outWorldPacketDump(uint32 socket, uint32 opcode, char const* opcodeNam
|
|||
if (!worldLogfile)
|
||||
return;
|
||||
|
||||
ACE_GUARD(ACE_Thread_Mutex, GuardObj, m_worldLogMtx);
|
||||
|
||||
outTimestamp(worldLogfile);
|
||||
|
||||
fprintf(worldLogfile, "\n%s:\nSOCKET: %u\nLENGTH: " SIZEFMTD "\nOPCODE: %s (0x%.4X)\nDATA:\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue