mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-07-05 17:53:55 +02:00
terminate non-established sessions sortly
This commit is contained in:
parent
5b2d0c579b
commit
86080b26ae
2 changed files with 2 additions and 0 deletions
|
@ -1113,6 +1113,7 @@ namespace garlic
|
|||
{
|
||||
CleanupUnconfirmedLeaseSet (ts);
|
||||
if (!m_Destination && ts > m_LastActivityTimestamp + ECIESX25519_SESSION_CREATE_TIMEOUT) return true; // m_LastActivityTimestamp is NS receive time
|
||||
if (m_State != eSessionStateEstablished && m_SessionCreatedTimestamp && ts > m_SessionCreatedTimestamp + ECIESX25519_SESSION_ESTABLISH_TIMEOUT) return true;
|
||||
return ts > m_LastActivityTimestamp + ECIESX25519_RECEIVE_EXPIRATION_TIMEOUT && // seconds
|
||||
ts*1000 > m_LastSentTimestamp + ECIESX25519_SEND_EXPIRATION_TIMEOUT*1000; // milliseconds
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue