mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-31 00:34:20 +00:00
delete pending outgoind session when SessionCreated received
This commit is contained in:
parent
5de224d6bf
commit
bceae244c1
@ -285,6 +285,11 @@ namespace transport
|
|||||||
return it->second;
|
return it->second;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SSU2Server::RemovePendingOutgoingSession (const boost::asio::ip::udp::endpoint& ep)
|
||||||
|
{
|
||||||
|
m_PendingOutgoingSessions.erase (ep);
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<SSU2Session> SSU2Server::GetRandomSession (i2p::data::RouterInfo::CompatibleTransports remoteTransports) const
|
std::shared_ptr<SSU2Session> SSU2Server::GetRandomSession (i2p::data::RouterInfo::CompatibleTransports remoteTransports) const
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,7 @@ namespace transport
|
|||||||
void RemoveSession (uint64_t connID);
|
void RemoveSession (uint64_t connID);
|
||||||
void AddSessionByRouterHash (std::shared_ptr<SSU2Session> session);
|
void AddSessionByRouterHash (std::shared_ptr<SSU2Session> session);
|
||||||
bool AddPendingOutgoingSession (std::shared_ptr<SSU2Session> session);
|
bool AddPendingOutgoingSession (std::shared_ptr<SSU2Session> session);
|
||||||
|
void RemovePendingOutgoingSession (const boost::asio::ip::udp::endpoint& ep);
|
||||||
std::shared_ptr<SSU2Session> FindSession (const i2p::data::IdentHash& ident) const;
|
std::shared_ptr<SSU2Session> FindSession (const i2p::data::IdentHash& ident) const;
|
||||||
std::shared_ptr<SSU2Session> FindPendingOutgoingSession (const boost::asio::ip::udp::endpoint& ep) const;
|
std::shared_ptr<SSU2Session> FindPendingOutgoingSession (const boost::asio::ip::udp::endpoint& ep) const;
|
||||||
std::shared_ptr<SSU2Session> GetRandomSession (i2p::data::RouterInfo::CompatibleTransports remoteTransports) const;
|
std::shared_ptr<SSU2Session> GetRandomSession (i2p::data::RouterInfo::CompatibleTransports remoteTransports) const;
|
||||||
|
@ -545,6 +545,7 @@ namespace transport
|
|||||||
HandlePayload (decryptedPayload.data (), decryptedPayload.size ());
|
HandlePayload (decryptedPayload.data (), decryptedPayload.size ());
|
||||||
|
|
||||||
m_Server.AddSession (shared_from_this ());
|
m_Server.AddSession (shared_from_this ());
|
||||||
|
m_Server.RemovePendingOutgoingSession (m_RemoteEndpoint);
|
||||||
SendSessionConfirmed (headerX + 16);
|
SendSessionConfirmed (headerX + 16);
|
||||||
KDFDataPhase (m_KeyDataSend, m_KeyDataReceive);
|
KDFDataPhase (m_KeyDataSend, m_KeyDataReceive);
|
||||||
Established ();
|
Established ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user