From 8de71fc9d6f2226e84074e941139ca0a8f1e6b0f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Mon, 21 Sep 2020 12:12:09 +0000 Subject: Synchronously save chunks on server shutdown (#4900) + Synchronously save chunks on server shutdown. Fixes #4884 --- src/Server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Server.cpp') diff --git a/src/Server.cpp b/src/Server.cpp index a1dedf333..67629ef2c 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -648,7 +648,8 @@ void cServer::Shutdown(void) // Notify the tick thread and wait for it to terminate: m_TickThread.Stop(); - cRoot::Get()->SaveAllChunks(); + // Save all chunks in all worlds, wait for chunks to be sent to the ChunkStorage queue for each world: + cRoot::Get()->SaveAllChunksNow(); // Remove all clients: cCSLock Lock(m_CSClients); -- cgit v1.2.3