fixed race consition

This commit is contained in:
orignal 2014-08-31 08:56:03 -04:00
parent 4abe89e34b
commit 168e20053a
4 changed files with 50 additions and 36 deletions

View file

@ -148,7 +148,9 @@ namespace tunnel
uint32_t m_NextReplyMsgID; // TODO: make it random later
std::thread * m_Thread;
std::map<uint32_t, Tunnel *> m_PendingTunnels; // by replyMsgID
std::mutex m_InboundTunnelsMutex;
std::map<uint32_t, InboundTunnel *> m_InboundTunnels;
std::mutex m_OutboundTunnelsMutex;
std::list<OutboundTunnel *> m_OutboundTunnels;
std::map<uint32_t, TransitTunnel *> m_TransitTunnels;
std::map<i2p::data::IdentHash, TunnelPool *> m_Pools;