From 3b630fe546d76e2c19e7540d3406888c7413e15b Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 16 Nov 2020 10:04:38 -0500 Subject: [PATCH] fixed race condition --- libi2pd/TunnelPool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libi2pd/TunnelPool.cpp b/libi2pd/TunnelPool.cpp index a44fc33d..a898d69e 100644 --- a/libi2pd/TunnelPool.cpp +++ b/libi2pd/TunnelPool.cpp @@ -292,6 +292,8 @@ namespace tunnel } // new tests + std::unique_lock l1(m_OutboundTunnelsMutex); + std::unique_lock l2(m_InboundTunnelsMutex); auto it1 = m_OutboundTunnels.begin (); auto it2 = m_InboundTunnels.begin (); while (it1 != m_OutboundTunnels.end () && it2 != m_InboundTunnels.end ())