diff options
author | Mattes D <github@xoft.cz> | 2015-07-23 16:15:21 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-07-23 16:15:21 +0200 |
commit | c74d856b57948fd30372cd2e92a99cf70edc8b5e (patch) | |
tree | 25021235eb076575f8c0d55e057e442f45646e90 /src | |
parent | Merge pull request #2375 from jammet/patch-8 (diff) | |
download | cuberite-c74d856b57948fd30372cd2e92a99cf70edc8b5e.tar cuberite-c74d856b57948fd30372cd2e92a99cf70edc8b5e.tar.gz cuberite-c74d856b57948fd30372cd2e92a99cf70edc8b5e.tar.bz2 cuberite-c74d856b57948fd30372cd2e92a99cf70edc8b5e.tar.lz cuberite-c74d856b57948fd30372cd2e92a99cf70edc8b5e.tar.xz cuberite-c74d856b57948fd30372cd2e92a99cf70edc8b5e.tar.zst cuberite-c74d856b57948fd30372cd2e92a99cf70edc8b5e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/NetworkSingleton.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/OSSupport/NetworkSingleton.cpp b/src/OSSupport/NetworkSingleton.cpp index 358e24438..417fab01e 100644 --- a/src/OSSupport/NetworkSingleton.cpp +++ b/src/OSSupport/NetworkSingleton.cpp @@ -93,7 +93,6 @@ cNetworkSingleton & cNetworkSingleton::Get(void) void cNetworkSingleton::Terminate(void) { ASSERT(!m_HasTerminated); - m_HasTerminated = true; // Wait for the LibEvent event loop to terminate: event_base_loopbreak(m_EventBase); @@ -113,6 +112,10 @@ void cNetworkSingleton::Terminate(void) event_base_free(m_EventBase); libevent_global_shutdown(); + + // Set the HasTerminated flag: + // (Only set the flag after everything has been removed, to avoid the random failures in the Google-test, caused by links terminating after this flag was set) + m_HasTerminated = true; } |