mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2026-07-28 07:59:22 +00:00
Merge pull request #2432 from freeacetone/fix-ssu2-terminate-intermediatequeue-race
Fix data race on intermediate queue in SSU2 session termination
This commit is contained in:
@@ -292,8 +292,11 @@ namespace transport
|
||||
#if OPENSSL_PQ
|
||||
m_PQKeys.reset (nullptr);
|
||||
#endif
|
||||
if (!m_IntermediateQueue.empty ())
|
||||
m_SendQueue.splice (m_SendQueue.end (), m_IntermediateQueue);
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_IntermediateQueueMutex);
|
||||
if (!m_IntermediateQueue.empty ())
|
||||
m_SendQueue.splice (m_SendQueue.end (), m_IntermediateQueue);
|
||||
}
|
||||
for (auto& it: m_SendQueue)
|
||||
it->Drop ();
|
||||
m_SendQueue.clear ();
|
||||
|
||||
Reference in New Issue
Block a user