Browse Source

fixed crash on termination

pull/1499/head
orignal 5 years ago
parent
commit
dd9b5faa5c
  1. 7
      libi2pd_client/I2CP.cpp

7
libi2pd_client/I2CP.cpp

@ -814,8 +814,11 @@ namespace client
{ {
m_IsRunning = false; m_IsRunning = false;
m_Acceptor.cancel (); m_Acceptor.cancel ();
for (auto& it: m_Sessions) {
it.second->Stop (); auto sessions = m_Sessions;
for (auto& it: sessions)
it.second->Stop ();
}
m_Sessions.clear (); m_Sessions.clear ();
m_Service.stop (); m_Service.stop ();
if (m_Thread) if (m_Thread)

Loading…
Cancel
Save