summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-18 12:27:46 +0200
committermadmaxoft <github@xoft.cz>2013-08-18 12:27:46 +0200
commit40e9e5b95b06d943a5a7b8e7fb60213defc0a622 (patch)
tree6aff595f6a364f39fa07cf49050fde3d2ff26e54 /source
parentDisabled Lua virtual hooks. (diff)
downloadcuberite-40e9e5b95b06d943a5a7b8e7fb60213defc0a622.tar
cuberite-40e9e5b95b06d943a5a7b8e7fb60213defc0a622.tar.gz
cuberite-40e9e5b95b06d943a5a7b8e7fb60213defc0a622.tar.bz2
cuberite-40e9e5b95b06d943a5a7b8e7fb60213defc0a622.tar.lz
cuberite-40e9e5b95b06d943a5a7b8e7fb60213defc0a622.tar.xz
cuberite-40e9e5b95b06d943a5a7b8e7fb60213defc0a622.tar.zst
cuberite-40e9e5b95b06d943a5a7b8e7fb60213defc0a622.zip
Diffstat (limited to 'source')
-rw-r--r--source/OSSupport/ListenThread.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/OSSupport/ListenThread.cpp b/source/OSSupport/ListenThread.cpp
index 4542326ef..c586227df 100644
--- a/source/OSSupport/ListenThread.cpp
+++ b/source/OSSupport/ListenThread.cpp
@@ -25,7 +25,7 @@ cListenThread::cListenThread(cCallback & a_Callback, cSocket::eFamily a_Family,
cListenThread::~cListenThread()
{
- // TODO
+ Stop();
}
@@ -79,7 +79,11 @@ void cListenThread::Stop(void)
// Wait for the thread to finish
super::Wait();
- // Clean up all sockets
+ // Close all the listening sockets:
+ for (cSockets::iterator itr = m_Sockets.begin(), end = m_Sockets.end(); itr != end; ++itr)
+ {
+ itr->CloseSocket();
+ } // for itr - m_Sockets[]
m_Sockets.clear();
}