mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-22 00:59:08 +01:00
clean up remote destinations without outgoing and unconfirmed tags
This commit is contained in:
parent
8061d306dd
commit
5215bdc035
3 changed files with 4 additions and 3 deletions
|
@ -28,7 +28,7 @@ namespace client
|
||||||
const int PUBLISH_CONFIRMATION_TIMEOUT = 5; // in seconds
|
const int PUBLISH_CONFIRMATION_TIMEOUT = 5; // in seconds
|
||||||
const int LEASESET_REQUEST_TIMEOUT = 5; // in seconds
|
const int LEASESET_REQUEST_TIMEOUT = 5; // in seconds
|
||||||
const int MAX_LEASESET_REQUEST_TIMEOUT = 40; // in seconds
|
const int MAX_LEASESET_REQUEST_TIMEOUT = 40; // in seconds
|
||||||
const int DESTINATION_CLEANUP_TIMEOUT = 20; // in minutes
|
const int DESTINATION_CLEANUP_TIMEOUT = 3; // in minutes
|
||||||
const unsigned int MAX_NUM_FLOODFILLS_PER_REQUEST = 7;
|
const unsigned int MAX_NUM_FLOODFILLS_PER_REQUEST = 7;
|
||||||
|
|
||||||
// I2CP
|
// I2CP
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace garlic
|
||||||
// delete expired unconfirmed tags
|
// delete expired unconfirmed tags
|
||||||
for (auto it = m_UnconfirmedTagsMsgs.begin (); it != m_UnconfirmedTagsMsgs.end ();)
|
for (auto it = m_UnconfirmedTagsMsgs.begin (); it != m_UnconfirmedTagsMsgs.end ();)
|
||||||
{
|
{
|
||||||
if (ts >= it->second->tagsCreationTime + OUTGOING_TAGS_EXPIRATION_TIMEOUT)
|
if (ts >= it->second->tagsCreationTime + OUTGOING_TAGS_CONFIRMATION_TIMEOUT)
|
||||||
{
|
{
|
||||||
if (m_Owner)
|
if (m_Owner)
|
||||||
m_Owner->RemoveDeliveryStatusSession (it->first);
|
m_Owner->RemoveDeliveryStatusSession (it->first);
|
||||||
|
@ -107,7 +107,7 @@ namespace garlic
|
||||||
else
|
else
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
return !m_SessionTags.empty () || m_UnconfirmedTagsMsgs.empty ();
|
return !m_SessionTags.empty () || !m_UnconfirmedTagsMsgs.empty ();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<I2NPMessage> GarlicRoutingSession::WrapSingleMessage (std::shared_ptr<const I2NPMessage> msg)
|
std::shared_ptr<I2NPMessage> GarlicRoutingSession::WrapSingleMessage (std::shared_ptr<const I2NPMessage> msg)
|
||||||
|
|
1
Garlic.h
1
Garlic.h
|
@ -38,6 +38,7 @@ namespace garlic
|
||||||
|
|
||||||
const int INCOMING_TAGS_EXPIRATION_TIMEOUT = 960; // 16 minutes
|
const int INCOMING_TAGS_EXPIRATION_TIMEOUT = 960; // 16 minutes
|
||||||
const int OUTGOING_TAGS_EXPIRATION_TIMEOUT = 720; // 12 minutes
|
const int OUTGOING_TAGS_EXPIRATION_TIMEOUT = 720; // 12 minutes
|
||||||
|
const int OUTGOING_TAGS_CONFIRMATION_TIMEOUT = 10; // 10 seconds
|
||||||
const int LEASET_CONFIRMATION_TIMEOUT = 4000; // in milliseconds
|
const int LEASET_CONFIRMATION_TIMEOUT = 4000; // in milliseconds
|
||||||
|
|
||||||
struct SessionTag: public i2p::data::Tag<32>
|
struct SessionTag: public i2p::data::Tag<32>
|
||||||
|
|
Loading…
Add table
Reference in a new issue