From 3095e142474b46227f991adfe7e05772eec1083e Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 10 Oct 2016 09:04:24 -0400 Subject: [PATCH] undo weird mutex changes --- Destination.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Destination.cpp b/Destination.cpp index dbdec0c7..a1e1858e 100644 --- a/Destination.cpp +++ b/Destination.cpp @@ -171,7 +171,7 @@ namespace client std::shared_ptr LeaseSetDestination::FindLeaseSet (const i2p::data::IdentHash& ident) { - std::unique_lock lock(m_RemoteLeaseSetsMutex); + std::lock_guard lock(m_RemoteLeaseSetsMutex); auto it = m_RemoteLeaseSets.find (ident); if (it != m_RemoteLeaseSets.end ()) { @@ -185,7 +185,10 @@ namespace client if(ls && !ls->IsExpired()) { ls->PopulateLeases(); - m_RemoteLeaseSets[ident] = ls; + { + std::lock_guard l(m_RemoteLeaseSetsMutex); + m_RemoteLeaseSets[ident] = ls; + } } }); }