fixed race condition

This commit is contained in:
orignal 2015-02-06 20:53:48 -05:00
parent 8305fd5f82
commit 5730b15f01
7 changed files with 34 additions and 18 deletions

View file

@ -54,6 +54,7 @@ namespace transport
NTCPSession (NTCPServer& server, std::shared_ptr<const i2p::data::RouterInfo> in_RemoteRouter = nullptr);
~NTCPSession ();
void Terminate ();
void Done ();
boost::asio::ip::tcp::socket& GetSocket () { return m_Socket; };
bool IsEstablished () const { return m_IsEstablished; };
@ -113,7 +114,7 @@ namespace transport
NTCPServer& m_Server;
boost::asio::ip::tcp::socket m_Socket;
boost::asio::deadline_timer m_TerminationTimer;
bool m_IsEstablished;
bool m_IsEstablished, m_IsTerminated;
i2p::crypto::CBCDecryption m_Decryption;
i2p::crypto::CBCEncryption m_Encryption;