mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-08 22:13:48 +01:00
fixed race condition
This commit is contained in:
parent
b8590075e6
commit
bff12b06f4
1 changed files with 7 additions and 3 deletions
|
@ -945,9 +945,13 @@ namespace data
|
|||
|
||||
std::shared_ptr<RouterProfile> RouterInfo::GetProfile () const
|
||||
{
|
||||
if (!m_Profile)
|
||||
m_Profile = GetRouterProfile (GetIdentHash ());
|
||||
return m_Profile;
|
||||
auto profile = m_Profile;
|
||||
if (!profile)
|
||||
{
|
||||
profile = GetRouterProfile (GetIdentHash ());
|
||||
m_Profile = profile;
|
||||
}
|
||||
return profile;
|
||||
}
|
||||
|
||||
void RouterInfo::Encrypt (const uint8_t * data, uint8_t * encrypted) const
|
||||
|
|
Loading…
Add table
Reference in a new issue