cListenThread correctly closes all sockets.
This partially fixes FS 421.
This commit is contained in:
parent
76cf61ce66
commit
40e9e5b95b
@ -25,7 +25,7 @@ cListenThread::cListenThread(cCallback & a_Callback, cSocket::eFamily a_Family,
|
|||||||
|
|
||||||
cListenThread::~cListenThread()
|
cListenThread::~cListenThread()
|
||||||
{
|
{
|
||||||
// TODO
|
Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -79,7 +79,11 @@ void cListenThread::Stop(void)
|
|||||||
// Wait for the thread to finish
|
// Wait for the thread to finish
|
||||||
super::Wait();
|
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();
|
m_Sockets.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user