fixed race condition

This commit is contained in:
orignal 2020-11-16 10:04:38 -05:00
parent c69c4ae8a0
commit 3b630fe546

View File

@ -292,6 +292,8 @@ namespace tunnel
}
// new tests
std::unique_lock<std::mutex> l1(m_OutboundTunnelsMutex);
std::unique_lock<std::mutex> l2(m_InboundTunnelsMutex);
auto it1 = m_OutboundTunnels.begin ();
auto it2 = m_InboundTunnels.begin ();
while (it1 != m_OutboundTunnels.end () && it2 != m_InboundTunnels.end ())