mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
replace GetSession to CreateSession
This commit is contained in:
parent
d01d033209
commit
e194854c6d
3 changed files with 12 additions and 11 deletions
6
SSU.cpp
6
SSU.cpp
|
@ -272,7 +272,7 @@ namespace transport
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<SSUSession> SSUServer::GetSession (std::shared_ptr<const i2p::data::RouterInfo> router, bool peerTest)
|
||||
void SSUServer::CreateSession (std::shared_ptr<const i2p::data::RouterInfo> router, bool peerTest)
|
||||
{
|
||||
std::shared_ptr<SSUSession> session;
|
||||
if (router)
|
||||
|
@ -350,7 +350,6 @@ namespace transport
|
|||
LogPrint (eLogWarning, "Can't connect to unreachable router. No introducers presented");
|
||||
std::unique_lock<std::mutex> l(m_SessionsMutex);
|
||||
m_Sessions.erase (remoteEndpoint);
|
||||
session.reset ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -358,7 +357,6 @@ namespace transport
|
|||
else
|
||||
LogPrint (eLogWarning, "Router ", i2p::data::GetIdentHashAbbreviation (router->GetIdentHash ()), " doesn't have SSU address");
|
||||
}
|
||||
return session;
|
||||
}
|
||||
|
||||
void SSUServer::DeleteSession (std::shared_ptr<SSUSession> session)
|
||||
|
@ -491,7 +489,7 @@ namespace transport
|
|||
{
|
||||
auto introducer = i2p::data::netdb.GetRandomIntroducer ();
|
||||
if (introducer)
|
||||
GetSession (introducer);
|
||||
CreateSession (introducer);
|
||||
}
|
||||
ScheduleIntroducersUpdateTimer ();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue