diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-04 22:13:08 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-03-04 22:13:08 +0100 |
commit | 28d8d8419a5b900e9d20ce91dc63e28349b6470a (patch) | |
tree | bf5b7bafa902a138339c78877ecec376c055b727 /source/Root.cpp | |
parent | Removed the unused cHeartbeat object (diff) | |
download | cuberite-28d8d8419a5b900e9d20ce91dc63e28349b6470a.tar cuberite-28d8d8419a5b900e9d20ce91dc63e28349b6470a.tar.gz cuberite-28d8d8419a5b900e9d20ce91dc63e28349b6470a.tar.bz2 cuberite-28d8d8419a5b900e9d20ce91dc63e28349b6470a.tar.lz cuberite-28d8d8419a5b900e9d20ce91dc63e28349b6470a.tar.xz cuberite-28d8d8419a5b900e9d20ce91dc63e28349b6470a.tar.zst cuberite-28d8d8419a5b900e9d20ce91dc63e28349b6470a.zip |
Diffstat (limited to 'source/Root.cpp')
-rw-r--r-- | source/Root.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/source/Root.cpp b/source/Root.cpp index 41788ff8d..ea33afe7e 100644 --- a/source/Root.cpp +++ b/source/Root.cpp @@ -163,28 +163,27 @@ void cRoot::Start(void) StartWorlds(); LOG("Starting server..."); - m_Server->StartListenThread(); - //cHeartBeat* HeartBeat = new cHeartBeat(); + m_Server->Start(); -#if !defined(ANDROID_NDK) + #if !defined(ANDROID_NDK) LOG("Starting InputThread..."); m_InputThread = new cThread( InputThread, this, "cRoot::InputThread" ); - m_InputThread->Start( false ); //we should NOT wait? Otherwise we canīt stop the server from other threads than the input thread -#endif + m_InputThread->Start( false ); // We should NOT wait? Otherwise we canīt stop the server from other threads than the input thread + #endif LOG("Initialization done, server running now."); - while( !m_bStop && !m_bRestart ) // These are modified by external threads + while (!m_bStop && !m_bRestart) // These are modified by external threads { - cSleep::MilliSleep( 1000 ); + cSleep::MilliSleep(1000); } -#if !defined(ANDROID_NDK) - delete m_InputThread; m_InputThread = 0; -#endif + #if !defined(ANDROID_NDK) + delete m_InputThread; m_InputThread = NULL; + #endif // Deallocate stuffs LOG("Shutting down server..."); - m_Server->Shutdown(); // This waits for threads to stop and d/c clients + m_Server->Shutdown(); // This waits for threads to stop and d/c clients LOG("Stopping world threads..."); StopWorlds(); LOG("Stopping authenticator..."); |