Browse Source

fixed crash on stop

pull/1474/head
orignal 5 years ago
parent
commit
63e807b0b4
  1. 9
      libi2pd_client/SAM.cpp

9
libi2pd_client/SAM.cpp

@ -1042,9 +1042,12 @@ namespace client
LogPrint (eLogError, "SAM: runtime exception: ", ex.what ()); LogPrint (eLogError, "SAM: runtime exception: ", ex.what ());
} }
for (auto& it: m_Sessions) {
it.second->CloseStreams (); std::unique_lock<std::mutex> l(m_SessionsMutex);
m_Sessions.clear (); for (auto& it: m_Sessions)
it.second->CloseStreams ();
m_Sessions.clear ();
}
StopIOService (); StopIOService ();
} }

Loading…
Cancel
Save