mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
fixed race condition on session termination
This commit is contained in:
parent
4f8b0e6484
commit
16290bf66f
@ -168,9 +168,7 @@ namespace transport
|
|||||||
{
|
{
|
||||||
m_State = eSSU2SessionStateTerminated;
|
m_State = eSSU2SessionStateTerminated;
|
||||||
m_ConnectTimer.cancel ();
|
m_ConnectTimer.cancel ();
|
||||||
transports.PeerDisconnected (shared_from_this ());
|
|
||||||
m_OnEstablished = nullptr;
|
m_OnEstablished = nullptr;
|
||||||
m_Server.RemoveSession (m_SourceConnID);
|
|
||||||
if (m_RelayTag)
|
if (m_RelayTag)
|
||||||
m_Server.RemoveRelay (m_RelayTag);
|
m_Server.RemoveRelay (m_RelayTag);
|
||||||
m_SentHandshakePacket.reset (nullptr);
|
m_SentHandshakePacket.reset (nullptr);
|
||||||
@ -179,6 +177,8 @@ namespace transport
|
|||||||
m_IncompleteMessages.clear ();
|
m_IncompleteMessages.clear ();
|
||||||
m_RelaySessions.clear ();
|
m_RelaySessions.clear ();
|
||||||
m_PeerTests.clear ();
|
m_PeerTests.clear ();
|
||||||
|
m_Server.RemoveSession (m_SourceConnID);
|
||||||
|
transports.PeerDisconnected (shared_from_this ());
|
||||||
LogPrint (eLogDebug, "SSU2: Session terminated");
|
LogPrint (eLogDebug, "SSU2: Session terminated");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user