diff options
author | madmaxoft <github@xoft.cz> | 2013-10-06 16:40:28 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-06 16:40:28 +0200 |
commit | f55b77a98a41ba784109842cde39ba0e1d2bc262 (patch) | |
tree | 89c1b144d1a224c24bc7ae79e9b0304766e01a8f /source/HTTPServer/HTTPServer.cpp | |
parent | cListenThread: Fixed thread termination. (diff) | |
download | cuberite-f55b77a98a41ba784109842cde39ba0e1d2bc262.tar cuberite-f55b77a98a41ba784109842cde39ba0e1d2bc262.tar.gz cuberite-f55b77a98a41ba784109842cde39ba0e1d2bc262.tar.bz2 cuberite-f55b77a98a41ba784109842cde39ba0e1d2bc262.tar.lz cuberite-f55b77a98a41ba784109842cde39ba0e1d2bc262.tar.xz cuberite-f55b77a98a41ba784109842cde39ba0e1d2bc262.tar.zst cuberite-f55b77a98a41ba784109842cde39ba0e1d2bc262.zip |
Diffstat (limited to 'source/HTTPServer/HTTPServer.cpp')
-rw-r--r-- | source/HTTPServer/HTTPServer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/HTTPServer/HTTPServer.cpp b/source/HTTPServer/HTTPServer.cpp index 9636eb59f..f6f5b0f8b 100644 --- a/source/HTTPServer/HTTPServer.cpp +++ b/source/HTTPServer/HTTPServer.cpp @@ -179,9 +179,9 @@ void cHTTPServer::Stop(void) // Drop all current connections: cCSLock Lock(m_CSConnections); - for (cHTTPConnections::iterator itr = m_Connections.begin(), end = m_Connections.end(); itr != end; ++itr) + while (!m_Connections.empty()) { - m_SocketThreads.RemoveClient(*itr); + m_Connections.front()->Terminate(); } // for itr - m_Connections[] } @@ -213,6 +213,7 @@ void cHTTPServer::CloseConnection(cHTTPConnection & a_Connection) break; } } + delete &a_Connection; } |