mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-17 12:51:49 +02:00
fixed race condition
This commit is contained in:
parent
cb6f6a6596
commit
2cd50ebaee
2 changed files with 5 additions and 3 deletions
libi2pd
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2021, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -338,7 +338,9 @@ namespace tunnel
|
|||
}
|
||||
|
||||
// new tests
|
||||
std::unique_lock<std::mutex> l1(m_OutboundTunnelsMutex);
|
||||
auto it1 = m_OutboundTunnels.begin ();
|
||||
std::unique_lock<std::mutex> l2(m_InboundTunnelsMutex);
|
||||
auto it2 = m_InboundTunnels.begin ();
|
||||
while (it1 != m_OutboundTunnels.end () && it2 != m_InboundTunnels.end ())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue