fixed race condition
This commit is contained in:
@@ -292,6 +292,8 @@ namespace tunnel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// new tests
|
// new tests
|
||||||
|
std::unique_lock<std::mutex> l1(m_OutboundTunnelsMutex);
|
||||||
|
std::unique_lock<std::mutex> l2(m_InboundTunnelsMutex);
|
||||||
auto it1 = m_OutboundTunnels.begin ();
|
auto it1 = m_OutboundTunnels.begin ();
|
||||||
auto it2 = m_InboundTunnels.begin ();
|
auto it2 = m_InboundTunnels.begin ();
|
||||||
while (it1 != m_OutboundTunnels.end () && it2 != m_InboundTunnels.end ())
|
while (it1 != m_OutboundTunnels.end () && it2 != m_InboundTunnels.end ())
|
||||||
|
Reference in New Issue
Block a user