Core/Database: Change database async thread shutdown to fix some corner cases leading to servers being stuck on shutdown (for example with exit() call)

This commit is contained in:
Shauren
2024-09-19 13:38:49 +02:00
parent 588639fc6c
commit 11a832fa8b
2 changed files with 15 additions and 7 deletions

View File

@@ -104,7 +104,8 @@ class TC_DATABASE_API MySQLConnection
private:
bool _HandleMySQLErrno(uint32 errNo, uint8 attempts = 5);
std::unique_ptr<std::thread> m_workerThread; //!< Core worker thread.
struct WorkerThread;
std::unique_ptr<WorkerThread> m_workerThread; //!< Core worker thread.
MySQLHandle* m_Mysql; //!< MySQL Handle.
MySQLConnectionInfo& m_connectionInfo; //!< Connection info (used for logging)
ConnectionFlags m_connectionFlags; //!< Connection flags (for preparing relevant statements)