Browse Source

undo weird mutex changes

pull/662/head
Jeff Becker 8 years ago
parent
commit
3095e14247
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B
  1. 7
      Destination.cpp

7
Destination.cpp

@ -171,7 +171,7 @@ namespace client @@ -171,7 +171,7 @@ namespace client
std::shared_ptr<const i2p::data::LeaseSet> LeaseSetDestination::FindLeaseSet (const i2p::data::IdentHash& ident)
{
std::unique_lock<std::mutex> lock(m_RemoteLeaseSetsMutex);
std::lock_guard<std::mutex> lock(m_RemoteLeaseSetsMutex);
auto it = m_RemoteLeaseSets.find (ident);
if (it != m_RemoteLeaseSets.end ())
{
@ -185,7 +185,10 @@ namespace client @@ -185,7 +185,10 @@ namespace client
if(ls && !ls->IsExpired())
{
ls->PopulateLeases();
m_RemoteLeaseSets[ident] = ls;
{
std::lock_guard<std::mutex> l(m_RemoteLeaseSetsMutex);
m_RemoteLeaseSets[ident] = ls;
}
}
});
}

Loading…
Cancel
Save