[Database] Address deadlock in player events (#2974)

* DB mutex testing

* Mutex tweaks, native string escaping
This commit is contained in:
Chris Miles
2023-02-20 22:32:29 -06:00
committed by GitHub
parent 6a668f8aa5
commit 33bb5aa8e5
4 changed files with 27 additions and 14 deletions
+2 -1
View File
@@ -113,7 +113,9 @@ bool PlayerEventLogs::IsEventEnabled(PlayerEvent::EventType event)
// this processes any current player events on the queue
void PlayerEventLogs::ProcessBatchQueue()
{
m_batch_queue_lock.lock();
if (m_record_batch_queue.empty()) {
m_batch_queue_lock.unlock();
return;
}
@@ -128,7 +130,6 @@ void PlayerEventLogs::ProcessBatchQueue()
);
// empty
m_batch_queue_lock.lock();
m_record_batch_queue = {};
m_batch_queue_lock.unlock();
}