mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-08-19 15:25:53 +01:00
shorter ack request interval
This commit is contained in:
parent
b9c9988ff4
commit
72ff0b9fbb
2 changed files with 8 additions and 6 deletions
libi2pd_client
|
@ -764,6 +764,7 @@ namespace client
|
|||
void I2CPSession::AddRoutingSession (const i2p::data::IdentHash& signingKey, std::shared_ptr<i2p::garlic::GarlicRoutingSession> remoteSession)
|
||||
{
|
||||
if (!remoteSession) return;
|
||||
remoteSession->SetAckRequestInterval (I2CP_SESSION_ACK_REQUEST_INTERVAL);
|
||||
std::lock_guard<std::mutex> l(m_RoutingSessionsMutex);
|
||||
m_RoutingSessions[signingKey] = remoteSession;
|
||||
}
|
||||
|
@ -1110,12 +1111,12 @@ namespace client
|
|||
void I2CPServer::Stop ()
|
||||
{
|
||||
m_Acceptor.cancel ();
|
||||
{
|
||||
auto sessions = m_Sessions;
|
||||
for (auto& it: sessions)
|
||||
it.second->Stop ();
|
||||
}
|
||||
m_Sessions.clear ();
|
||||
|
||||
decltype(m_Sessions) sessions;
|
||||
m_Sessions.swap (sessions);
|
||||
for (auto& it: sessions)
|
||||
it.second->Stop ();
|
||||
|
||||
StopIOService ();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue