Compare commits

..

1 Commits

Author SHA1 Message Date
self-related
82ef1c37bc Merge 32a70562c4 into b9c9988ff4 2025-01-25 11:53:37 +03:00
2 changed files with 6 additions and 8 deletions

View File

@@ -764,7 +764,6 @@ 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;
}
@@ -1111,12 +1110,12 @@ namespace client
void I2CPServer::Stop ()
{
m_Acceptor.cancel ();
decltype(m_Sessions) sessions;
m_Sessions.swap (sessions);
for (auto& it: sessions)
it.second->Stop ();
{
auto sessions = m_Sessions;
for (auto& it: sessions)
it.second->Stop ();
}
m_Sessions.clear ();
StopIOService ();
}

View File

@@ -31,7 +31,6 @@ namespace client
const size_t I2CP_MAX_MESSAGE_LENGTH = 65535;
const size_t I2CP_MAX_SEND_QUEUE_SIZE = 1024*1024; // in bytes, 1M
const int I2CP_LEASESET_CREATION_TIMEOUT = 10; // in seconds
const int I2CP_SESSION_ACK_REQUEST_INTERVAL = 12100; // in milliseconds
const size_t I2CP_HEADER_LENGTH_OFFSET = 0;
const size_t I2CP_HEADER_TYPE_OFFSET = I2CP_HEADER_LENGTH_OFFSET + 4;