summaryrefslogtreecommitdiffstats
path: root/source/Root.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-14 22:39:12 +0200
committermadmaxoft <github@xoft.cz>2013-08-14 22:39:12 +0200
commit50205bc4df3c272b88a5edd81a35ac0aca8213d5 (patch)
treebfd62cc2bea2d74411acfdc99ffc2ef8d0fffc50 /source/Root.cpp
parentFixed world's a_Dt parameter getting time values in wrong units. (diff)
downloadcuberite-50205bc4df3c272b88a5edd81a35ac0aca8213d5.tar
cuberite-50205bc4df3c272b88a5edd81a35ac0aca8213d5.tar.gz
cuberite-50205bc4df3c272b88a5edd81a35ac0aca8213d5.tar.bz2
cuberite-50205bc4df3c272b88a5edd81a35ac0aca8213d5.tar.lz
cuberite-50205bc4df3c272b88a5edd81a35ac0aca8213d5.tar.xz
cuberite-50205bc4df3c272b88a5edd81a35ac0aca8213d5.tar.zst
cuberite-50205bc4df3c272b88a5edd81a35ac0aca8213d5.zip
Diffstat (limited to '')
-rw-r--r--source/Root.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/Root.cpp b/source/Root.cpp
index 166932cf2..07de0775c 100644
--- a/source/Root.cpp
+++ b/source/Root.cpp
@@ -16,6 +16,7 @@
#include "Chunk.h"
#include "Protocol/ProtocolRecognizer.h" // for protocol version constants
#include "CommandOutput.h"
+#include "DeadlockDetect.h"
#include "../iniFile/iniFile.h"
@@ -90,6 +91,7 @@ void cRoot::InputThread(void * a_Params)
void cRoot::Start(void)
{
+ cDeadlockDetect dd;
delete m_Log;
m_Log = new cMCLogger();
@@ -162,6 +164,9 @@ void cRoot::Start(void)
LOG("Starting worlds...");
StartWorlds();
+ LOG("Starting deadlock detector...");
+ dd.Start();
+
LOG("Starting server...");
m_Server->Start();
@@ -183,17 +188,21 @@ void cRoot::Start(void)
// Deallocate stuffs
LOG("Shutting down server...");
- m_Server->Shutdown(); // This waits for threads to stop and d/c clients
+ m_Server->Shutdown();
+
+ LOG("Shutting down deadlock detector...");
+ dd.Stop();
+
LOG("Stopping world threads...");
StopWorlds();
+
LOG("Stopping authenticator...");
m_Authenticator.Stop();
-
LOG("Freeing MonsterConfig...");
- delete m_MonsterConfig; m_MonsterConfig = 0;
+ delete m_MonsterConfig; m_MonsterConfig = NULL;
LOG("Stopping WebAdmin...");
- delete m_WebAdmin; m_WebAdmin = 0;
+ delete m_WebAdmin; m_WebAdmin = NULL;
LOG("Unloading recipes...");
delete m_FurnaceRecipe; m_FurnaceRecipe = NULL;
delete m_CraftingRecipes; m_CraftingRecipes = NULL;