diff options
author | Machiavelli <none@none> | 2010-05-13 17:24:54 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2010-05-13 17:24:54 +0200 |
commit | 144a1468108c553f7f92f2d72511baadea0c7c28 (patch) | |
tree | f08ba886f7d9229dc2955ffb4aaee076a244ef6f /src/shared/Database/Database.cpp | |
parent | 28bbc233d11f16424d3bb65b95e80d6d75353456 (diff) |
Fix crash introduced in 4610bbf047.
- Update SqlAsyncTask´s destructor, properly NULLpoint SqlOperation* m_op so other threads can deal with it accordingly.
- Don´t keep NULL´d elements in transaction queues, remove them instead.
This now means you should be able to run a stable server with > 2 MapUpdate threads. Please leave feedback.
Courtesy of click and myself.
--HG--
branch : trunk
Diffstat (limited to 'src/shared/Database/Database.cpp')
-rw-r--r-- | src/shared/Database/Database.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/Database/Database.cpp b/src/shared/Database/Database.cpp index d03f8704896..40ab58fa621 100644 --- a/src/shared/Database/Database.cpp +++ b/src/shared/Database/Database.cpp @@ -591,6 +591,7 @@ bool Database::CommitTransaction() if (i != m_tranQueues.end() && i->second != NULL) { m_threadBody->Delay(i->second); + m_tranQueues.erase(i); return true; } else @@ -620,6 +621,7 @@ bool Database::RollbackTransaction() { delete i->second; i->second = NULL; + m_tranQueues.erase(i); } return true; |