mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
pick established tunnels only
This commit is contained in:
parent
a096a3931d
commit
c025bcfdfc
2 changed files with 16 additions and 12 deletions
|
@ -409,7 +409,7 @@ namespace tunnel
|
|||
}
|
||||
else
|
||||
{
|
||||
if (ts + TUNNEL_EXPIRATION_THRESHOLD > (*it)->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
|
||||
if ((*it)->IsEstablished () && ts + TUNNEL_EXPIRATION_THRESHOLD > (*it)->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
|
||||
(*it)->SetState (eTunnelStateExpiring);
|
||||
it++;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ namespace tunnel
|
|||
}
|
||||
else
|
||||
{
|
||||
if (ts + TUNNEL_EXPIRATION_THRESHOLD > it->second->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
|
||||
if (it->second->IsEstablished () && ts + TUNNEL_EXPIRATION_THRESHOLD > it->second->GetCreationTime () + TUNNEL_EXPIRATION_TIMEOUT)
|
||||
it->second->SetState (eTunnelStateExpiring);
|
||||
it++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue