diff options
author | Mattes D <github@xoft.cz> | 2016-06-26 15:51:12 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2016-06-26 15:51:12 +0200 |
commit | 1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73 (patch) | |
tree | b94e203e895c25d7724c3db71564fcbf4027fb9e /src/OSSupport/NetworkSingleton.cpp | |
parent | Merge pull request #3240 from cuberite/grownvisualizer (diff) | |
download | cuberite-1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73.tar cuberite-1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73.tar.gz cuberite-1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73.tar.bz2 cuberite-1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73.tar.lz cuberite-1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73.tar.xz cuberite-1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73.tar.zst cuberite-1462e4f70e6bc8e42f6a5b5e959b7e34f2774a73.zip |
Diffstat (limited to 'src/OSSupport/NetworkSingleton.cpp')
-rw-r--r-- | src/OSSupport/NetworkSingleton.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/OSSupport/NetworkSingleton.cpp b/src/OSSupport/NetworkSingleton.cpp index d0abafcbd..dcf17bccb 100644 --- a/src/OSSupport/NetworkSingleton.cpp +++ b/src/OSSupport/NetworkSingleton.cpp @@ -91,10 +91,8 @@ void cNetworkSingleton::Initialise(void) // Create the event loop thread: m_HasTerminated = false; - m_StartupEvent.reset(new cEvent); m_EventLoopThread = std::thread(RunEventLoop, this); - m_StartupEvent->Wait(); // Wait for the LibEvent loop to actually start running (otherwise calling Terminate too soon would hang, see #3228) - m_StartupEvent.reset(); // Don't need the cEvent any more, release all its resources + m_StartupEvent.Wait(); // Wait for the LibEvent loop to actually start running (otherwise calling Terminate too soon would hang, see #3228) } @@ -169,8 +167,7 @@ void cNetworkSingleton::SignalizeStartup(evutil_socket_t a_Socket, short a_Event { auto self = reinterpret_cast<cNetworkSingleton *>(a_Self); ASSERT(self != nullptr); - ASSERT(self->m_StartupEvent != nullptr); - self->m_StartupEvent->Set(); + self->m_StartupEvent.Set(); } |