mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
delete expired incoming tags
This commit is contained in:
parent
00d9ef806b
commit
fcd3680547
2 changed files with 28 additions and 5 deletions
7
Garlic.h
7
Garlic.h
|
@ -37,7 +37,7 @@ namespace garlic
|
|||
};
|
||||
#pragma pack()
|
||||
|
||||
const int INCOMING_TAGS_EXPIRATION_TIMEOUT = 900; // 15 minutes
|
||||
const int INCOMING_TAGS_EXPIRATION_TIMEOUT = 960; // 16 minutes
|
||||
const int OUTGOING_TAGS_EXPIRATION_TIMEOUT = 720; // 12 minutes
|
||||
|
||||
struct SessionTag: public i2p::data::Tag<32>
|
||||
|
@ -102,7 +102,7 @@ namespace garlic
|
|||
{
|
||||
public:
|
||||
|
||||
GarlicDestination () {};
|
||||
GarlicDestination (): m_LastTagsCleanupTime (0) {};
|
||||
~GarlicDestination ();
|
||||
|
||||
GarlicRoutingSession * GetRoutingSession (const i2p::data::RoutingDestination& destination, int numTags);
|
||||
|
@ -136,7 +136,8 @@ namespace garlic
|
|||
std::mutex m_SessionsMutex;
|
||||
std::map<i2p::data::IdentHash, GarlicRoutingSession *> m_Sessions;
|
||||
// incoming
|
||||
std::map<SessionTag, std::shared_ptr<i2p::crypto::CBCDecryption>> m_Tags;
|
||||
std::map<SessionTag, std::shared_ptr<i2p::crypto::CBCDecryption>> m_Tags;
|
||||
uint32_t m_LastTagsCleanupTime;
|
||||
// DeliveryStatus
|
||||
std::map<uint32_t, GarlicRoutingSession *> m_CreatedSessions; // msgID -> session
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue