mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-18 23:36:39 +01:00
undo weird mutex changes
This commit is contained in:
parent
a332d68704
commit
3095e14247
1 changed files with 5 additions and 2 deletions
|
@ -171,7 +171,7 @@ namespace client
|
||||||
|
|
||||||
std::shared_ptr<const i2p::data::LeaseSet> LeaseSetDestination::FindLeaseSet (const i2p::data::IdentHash& ident)
|
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);
|
auto it = m_RemoteLeaseSets.find (ident);
|
||||||
if (it != m_RemoteLeaseSets.end ())
|
if (it != m_RemoteLeaseSets.end ())
|
||||||
{
|
{
|
||||||
|
@ -185,8 +185,11 @@ namespace client
|
||||||
if(ls && !ls->IsExpired())
|
if(ls && !ls->IsExpired())
|
||||||
{
|
{
|
||||||
ls->PopulateLeases();
|
ls->PopulateLeases();
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> l(m_RemoteLeaseSetsMutex);
|
||||||
m_RemoteLeaseSets[ident] = ls;
|
m_RemoteLeaseSets[ident] = ls;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return it->second;
|
return it->second;
|
||||||
|
|
Loading…
Add table
Reference in a new issue