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:
jackpoz
2014-09-10 19:57:02 +02:00
parent 449d7c196a
commit 8bb4f33852

View File

@@ -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()