Core/DBLayer: Fix another possible crash on shutdown. This should be the last of them caused by this area of the core.
This commit is contained in:
@@ -47,6 +47,5 @@ int DatabaseWorker::svc()
|
||||
delete request;
|
||||
}
|
||||
|
||||
m_conn->Close();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -109,9 +109,9 @@ class DatabaseWorkerPool
|
||||
/// Now we just wait until m_queue gives the signal to the worker threads to stop
|
||||
T* t = m_connections[IDX_ASYNC][i];
|
||||
DatabaseWorker* worker = t->m_worker;
|
||||
worker->wait(); // t->Close(); is called from worker thread
|
||||
worker->wait();
|
||||
delete worker;
|
||||
--m_connectionCount[IDX_ASYNC];
|
||||
t->Close();
|
||||
}
|
||||
|
||||
sLog->outSQLDriver("Asynchronous connections on databasepool '%s' terminated. Proceeding with synchronous connections.", m_connectionInfo.database.c_str());
|
||||
@@ -123,7 +123,6 @@ class DatabaseWorkerPool
|
||||
//while (1)
|
||||
// if (t->LockIfReady()) -- For some reason deadlocks us
|
||||
t->Close();
|
||||
--m_connectionCount[IDX_SYNCH];
|
||||
}
|
||||
|
||||
sLog->outSQLDriver("All connections on databasepool %s closed.", m_connectionInfo.database.c_str());
|
||||
|
||||
Reference in New Issue
Block a user