mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
don't connect peer test session. Use weak_ptr for seesions by hash
This commit is contained in:
parent
edb2ba7107
commit
0912de5b77
4 changed files with 67 additions and 42 deletions
|
@ -3140,7 +3140,7 @@ namespace transport
|
|||
SendPeerTest (7, buf + offset, len - offset);
|
||||
else
|
||||
LogPrint (eLogWarning, "SSU2: Unknown address for peer test 6");
|
||||
GetServer ().RemoveSession (~htobe64 (((uint64_t)nonce << 32) | nonce));
|
||||
GetServer ().RemoveSession (GetConnID ());
|
||||
break;
|
||||
}
|
||||
case 7: // Alice from Charlie 2
|
||||
|
@ -3148,7 +3148,7 @@ namespace transport
|
|||
auto addr = GetAddress ();
|
||||
if (addr && addr->IsV6 ())
|
||||
i2p::context.SetStatusV6 (eRouterStatusOK); // set status OK for ipv6 even if from SSU2
|
||||
GetServer ().RemoveSession (htobe64 (((uint64_t)nonce << 32) | nonce));
|
||||
GetServer ().RemoveSession (GetConnID ());
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -3203,5 +3203,16 @@ namespace transport
|
|||
SetAddress (addr);
|
||||
SendPeerTest (msg, signedData, signedDataLen);
|
||||
}
|
||||
|
||||
void SSU2PeerTestSession::Connect ()
|
||||
{
|
||||
LogPrint (eLogError, "SSU2: Can't connect peer test session");
|
||||
}
|
||||
|
||||
bool SSU2PeerTestSession::ProcessFirstIncomingMessage (uint64_t connID, uint8_t * buf, size_t len)
|
||||
{
|
||||
LogPrint (eLogError, "SSU2: Can't handle incoming message in peer test session");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue