Browse Source

proper termination

pull/100/head
orignal 10 years ago
parent
commit
11402708da
  1. 3
      Queue.h
  2. 1
      Transports.cpp

3
Queue.h

@ -134,13 +134,14 @@ namespace util @@ -134,13 +134,14 @@ namespace util
}
if (m_OnEmpty != nullptr)
m_OnEmpty ();
if (m_IsRunning)
Queue<Msg>::Wait ();
}
}
private:
bool m_IsRunning;
volatile bool m_IsRunning;
std::thread m_Thread;
OnEmpty m_OnEmpty;
};

1
Transports.cpp

@ -142,6 +142,7 @@ namespace i2p @@ -142,6 +142,7 @@ namespace i2p
delete session.second;
m_NTCPSessions.clear ();
delete m_NTCPAcceptor;
m_NTCPAcceptor = nullptr;
m_DHKeysPairSupplier.Stop ();
m_IsRunning = false;

Loading…
Cancel
Save