mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
use SSU if NTCP is not available
This commit is contained in:
parent
c5f70d4559
commit
4862b594e8
2 changed files with 29 additions and 8 deletions
|
@ -168,7 +168,23 @@ namespace i2p
|
|||
AddNTCPSession (session);
|
||||
}
|
||||
else
|
||||
LogPrint ("No NTCP addresses available");
|
||||
{
|
||||
// SSU always have lower prioprity than NTCP
|
||||
// TODO: it shouldn't
|
||||
LogPrint ("No NTCP addresses available. Trying SSU");
|
||||
address = r->GetSSUAddress ();
|
||||
if (address && m_SSUServer)
|
||||
{
|
||||
auto s = m_SSUServer->GetSession (r);
|
||||
if (s)
|
||||
{
|
||||
s->SendI2NPMessage (msg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
LogPrint ("No SSU addresses available");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue