Browse Source

correct NTCP sessions termination

pull/731/head
orignal 8 years ago
parent
commit
81978b214c
  1. 6
      NTCPSession.cpp

6
NTCPSession.cpp

@ -803,6 +803,12 @@ namespace transport
void NTCPServer::Stop () void NTCPServer::Stop ()
{ {
{
// we have to copy it because Terminate changes m_NTCPSessions
auto ntcpSessions = m_NTCPSessions;
for (auto& it: ntcpSessions)
it.second->Terminate ();
}
m_NTCPSessions.clear (); m_NTCPSessions.clear ();
if (m_IsRunning) if (m_IsRunning)

Loading…
Cancel
Save