diff options
author | Mattes D <github@xoft.cz> | 2015-01-26 14:46:20 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-27 14:53:37 +0100 |
commit | 053362e604c98c229df57337ba7752d4d6b97fa8 (patch) | |
tree | 774001009deb09c66a7d3e6639a533c6f4ece721 /src/main.cpp | |
parent | cTCPLinkImpl: Added the BEV_OPT_THREADSAFE flag. (diff) | |
download | cuberite-053362e604c98c229df57337ba7752d4d6b97fa8.tar cuberite-053362e604c98c229df57337ba7752d4d6b97fa8.tar.gz cuberite-053362e604c98c229df57337ba7752d4d6b97fa8.tar.bz2 cuberite-053362e604c98c229df57337ba7752d4d6b97fa8.tar.lz cuberite-053362e604c98c229df57337ba7752d4d6b97fa8.tar.xz cuberite-053362e604c98c229df57337ba7752d4d6b97fa8.tar.zst cuberite-053362e604c98c229df57337ba7752d4d6b97fa8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main.cpp | 11 |
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; } |