From 393e34d571e330c3e6a69dde3d9d13a7fef140db Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 13 Mar 2012 21:13:34 +0000 Subject: Fixed the server not waiting for the world to save completely before stopping git-svn-id: http://mc-server.googlecode.com/svn/trunk@410 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/WorldStorage.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/WorldStorage.cpp b/source/WorldStorage.cpp index acd681e7f..4a4b68134 100644 --- a/source/WorldStorage.cpp +++ b/source/WorldStorage.cpp @@ -152,6 +152,9 @@ void cWorldStorage::WaitForFinish(void) m_LoadQueue.clear(); } + // Wait for the saving to finish: + WaitForQueuesEmpty(); + // Wait for the thread to finish: m_ShouldTerminate = true; m_Event.Set(); -- cgit v1.2.3