Core/Database: Fixed a shutdown crash happening if worldserver did not fully start up (for example applying a db update failed)

This commit is contained in:
Shauren
2023-12-29 00:31:55 +01:00
parent 42de312a79
commit a2be97414b

View File

@@ -167,7 +167,8 @@ void DatabaseWorkerPool<T>::Close()
{
TC_LOG_INFO("sql.driver", "Closing down DatabasePool '{}'.", GetDatabaseName());
_ioContext->stop();
if (_ioContext)
_ioContext->stop();
//! Closes the actualy MySQL connection.
_connections[IDX_ASYNC].clear();