fixed race condition

This commit is contained in:
orignal 2014-10-11 09:01:08 -04:00
parent 22773bd678
commit f34680134a
4 changed files with 22 additions and 20 deletions

View file

@ -48,6 +48,9 @@ namespace tunnel
void TestTunnels ();
void ProcessDeliveryStatus (I2NPMessage * msg);
bool IsDeleted () const { return m_IsDeleted; };
void SetDeleted () { m_IsDeleted = true; }
private:
void CreateInboundTunnel ();
@ -68,6 +71,7 @@ namespace tunnel
mutable std::mutex m_OutboundTunnelsMutex;
std::set<OutboundTunnel *, TunnelCreationTimeCmp> m_OutboundTunnels;
std::map<uint32_t, std::pair<OutboundTunnel *, InboundTunnel *> > m_Tests;
bool m_IsDeleted;
public: