summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2015-02-06 21:52:14 +0100
committerHowaner <franzi.moos@googlemail.com>2015-02-06 21:52:14 +0100
commit2c7925f0adc17d7680ff9791832ab2c349c2301f (patch)
treeef6233b0d9dece6f7520996f2a4d850470e2c2d3 /src/main.cpp
parentReadded old DistributeStackToAreas() comment. (diff)
parentSwitched LuaState to use sizeof... (diff)
downloadcuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.gz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.bz2
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.lz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.xz
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.tar.zst
cuberite-2c7925f0adc17d7680ff9791832ab2c349c2301f.zip
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index d4adc1ed9..20609a2f8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,13 +11,17 @@
#include <dbghelp.h>
#endif // _MSC_VER
+#include "OSSupport/NetworkSingleton.h"
-bool cRoot::m_TerminateEventRaised = false; // If something has told the server to stop; checked periodically in cRoot
-static bool g_ServerTerminated = false; // Set to true when the server terminates, so our CTRL handler can then tell the OS to close the console
+/** If something has told the server to stop; checked periodically in cRoot */
+bool cRoot::m_TerminateEventRaised = false;
+
+/** Set to true when the server terminates, so our CTRL handler can then tell the OS to close the console. */
+static bool g_ServerTerminated = false;
/** If set to true, the protocols will log each player's incoming (C->S) communication to a per-connection logfile */
bool g_ShouldLogCommIn;
@@ -305,6 +309,9 @@ int main( int argc, char **argv)
g_ServerTerminated = true;
+ // Shutdown all of LibEvent:
+ cNetworkSingleton::Get().Terminate();
+
return EXIT_SUCCESS;
}