mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/DB: Fix crash on shutdown
Fix race condition crash on shutdown, closing MySQL connections with queries still being executed
This commit is contained in:
@@ -57,14 +57,14 @@ m_connectionFlags(CONNECTION_ASYNC)
|
||||
|
||||
MySQLConnection::~MySQLConnection()
|
||||
{
|
||||
if (m_worker)
|
||||
delete m_worker;
|
||||
|
||||
for (size_t i = 0; i < m_stmts.size(); ++i)
|
||||
delete m_stmts[i];
|
||||
|
||||
if (m_Mysql)
|
||||
mysql_close(m_Mysql);
|
||||
|
||||
if (m_worker)
|
||||
delete m_worker;
|
||||
}
|
||||
|
||||
void MySQLConnection::Close()
|
||||
|
||||
Reference in New Issue
Block a user