mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 21:06:39 +01:00
fixed race condition
This commit is contained in:
parent
c69c4ae8a0
commit
3b630fe546
1 changed files with 2 additions and 0 deletions
|
@ -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 ())
|
||||
|
|
Loading…
Add table
Reference in a new issue