From 144a1468108c553f7f92f2d72511baadea0c7c28 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Thu, 13 May 2010 17:24:54 +0200 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/shared/Database/Database.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/shared/Database/Database.cpp') 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; -- cgit v1.2.3