mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 04:04:16 +00:00
fixed race condition
This commit is contained in:
parent
3da6b3930b
commit
31d716bd0c
@ -499,8 +499,9 @@ namespace transport
|
|||||||
{
|
{
|
||||||
m_Service.post([session, this]()
|
m_Service.post([session, this]()
|
||||||
{
|
{
|
||||||
if (!session->GetRemoteIdentity ()) return;
|
auto remoteIdentity = session->GetRemoteIdentity ();
|
||||||
auto ident = session->GetRemoteIdentity ()->GetIdentHash ();
|
if (!remoteIdentity) return;
|
||||||
|
auto ident = remoteIdentity->GetIdentHash ();
|
||||||
auto it = m_Peers.find (ident);
|
auto it = m_Peers.find (ident);
|
||||||
if (it != m_Peers.end ())
|
if (it != m_Peers.end ())
|
||||||
{
|
{
|
||||||
@ -520,8 +521,9 @@ namespace transport
|
|||||||
{
|
{
|
||||||
m_Service.post([session, this]()
|
m_Service.post([session, this]()
|
||||||
{
|
{
|
||||||
if (!session->GetRemoteIdentity ()) return;
|
auto remoteIdentity = session->GetRemoteIdentity ();
|
||||||
auto ident = session->GetRemoteIdentity ()->GetIdentHash ();
|
if (!remoteIdentity) return;
|
||||||
|
auto ident = remoteIdentity->GetIdentHash ();
|
||||||
auto it = m_Peers.find (ident);
|
auto it = m_Peers.find (ident);
|
||||||
if (it != m_Peers.end ())
|
if (it != m_Peers.end ())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user