1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-19 13:40:00 +00:00

correct NTCP sessions termination

This commit is contained in:
orignal 2016-11-30 09:24:49 -05:00
parent 5699b7bae5
commit 81978b214c

View File

@ -803,6 +803,12 @@ namespace transport
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 ();
if (m_IsRunning)