From 5958478c59d7e261098b7ce161686953339d17db Mon Sep 17 00:00:00 2001 From: faketruth Date: Wed, 15 Feb 2012 21:35:59 +0000 Subject: Fixed a deadlock in WorldStorage git-svn-id: http://mc-server.googlecode.com/svn/trunk@265 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WorldStorage.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/WorldStorage.cpp b/source/WorldStorage.cpp index 979283895..bdc0e84a9 100644 --- a/source/WorldStorage.cpp +++ b/source/WorldStorage.cpp @@ -78,9 +78,11 @@ void cWorldStorage::WaitForFinish(void) { LOG("Waiting for the world storage to finish saving"); - // Cancel all loading requests: - cCSLock Lock(m_CSLoadQueue); - m_LoadQueue.clear(); + { + // Cancel all loading requests: + cCSLock Lock(m_CSLoadQueue); + m_LoadQueue.clear(); + } // Wait for the thread to finish: mShouldTerminate = true; -- cgit v1.2.3