summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-21 14:41:08 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-21 14:41:08 +0200
commit014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5 (patch)
treeea5da91e8335d536436815e4b5863d40282af3fb /src
parentReplace &*[0] accesses with .data() (diff)
downloadcuberite-014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5.tar
cuberite-014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5.tar.gz
cuberite-014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5.tar.bz2
cuberite-014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5.tar.lz
cuberite-014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5.tar.xz
cuberite-014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5.tar.zst
cuberite-014ebb7fe641d14fd5f2d9d65ec336f5bf98b7f5.zip
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 5391fa9c9..b6ee8c0a7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -158,12 +158,9 @@ BOOL CtrlHandler(DWORD fdwCtrlType)
cRoot::m_TerminateEventRaised = true;
LOGD("Terminate event raised from the Windows CtrlHandler");
- if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
+ while (!g_ServerTerminated)
{
- while (!g_ServerTerminated)
- {
- std::this_thread::sleep_for(std::chrono::milliseconds(50)); // Delay as much as possible to try to get the server to shut down cleanly
- }
+ std::this_thread::sleep_for(std::chrono::milliseconds(50)); // Delay as much as possible to try to get the server to shut down cleanly
}
return TRUE;