mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
don't handle PeerTest 1 with same nonce twice
This commit is contained in:
parent
608056dcd2
commit
79e8ccbb5b
1 changed files with 23 additions and 19 deletions
|
@ -2162,7 +2162,8 @@ namespace transport
|
|||
GetRemoteIdentity ()->GetIdentHash ());
|
||||
if (session) // session with Charlie
|
||||
{
|
||||
m_Server.AddPeerTest (nonce, shared_from_this (), ts/1000);
|
||||
if (m_Server.AddPeerTest (nonce, shared_from_this (), ts/1000))
|
||||
{
|
||||
auto packet = m_Server.GetSentPacketsPool ().AcquireShared ();
|
||||
// Alice's RouterInfo
|
||||
auto r = i2p::data::netdb.FindRouter (GetRemoteIdentity ()->GetIdentHash ());
|
||||
|
@ -2186,6 +2187,9 @@ namespace transport
|
|||
packet->sendTime = ts;
|
||||
session->m_SentPackets.emplace (packetNum, packet);
|
||||
}
|
||||
else
|
||||
LogPrint (eLogInfo, "SSU2: Peer test 1 nonce ", nonce, " already exists. Ignored");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Charlie not found, send error back to Alice
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue