mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 02:54:01 +01:00
delete stream in destination's thread
This commit is contained in:
parent
03914b4f41
commit
c92d99718b
|
@ -102,7 +102,7 @@ namespace stream
|
|||
{
|
||||
std::unique_lock<std::mutex> l(m_StreamsMutex);
|
||||
for (auto it: m_Streams)
|
||||
delete it.second;
|
||||
delete it.second;
|
||||
m_Streams.clear ();
|
||||
}
|
||||
if (m_Pool)
|
||||
|
@ -186,7 +186,10 @@ namespace stream
|
|||
if (it != m_Streams.end ())
|
||||
{
|
||||
m_Streams.erase (it);
|
||||
delete stream;
|
||||
if (m_Service)
|
||||
m_Service->post ([stream](void) { delete stream; });
|
||||
else
|
||||
delete stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,6 +201,7 @@ namespace stream
|
|||
m_IsReset = true;
|
||||
m_ReceiveTimer.cancel ();
|
||||
m_ResendTimer.cancel ();
|
||||
m_AckSendTimer.cancel ();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue