mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-24 01:46:36 +02:00
fixed crash on stop
This commit is contained in:
parent
012f22cc47
commit
63e807b0b4
1 changed files with 6 additions and 3 deletions
|
@ -1042,9 +1042,12 @@ namespace client
|
|||
LogPrint (eLogError, "SAM: runtime exception: ", ex.what ());
|
||||
}
|
||||
|
||||
for (auto& it: m_Sessions)
|
||||
it.second->CloseStreams ();
|
||||
m_Sessions.clear ();
|
||||
{
|
||||
std::unique_lock<std::mutex> l(m_SessionsMutex);
|
||||
for (auto& it: m_Sessions)
|
||||
it.second->CloseStreams ();
|
||||
m_Sessions.clear ();
|
||||
}
|
||||
StopIOService ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue