mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
count non-replied tunnel build requests
This commit is contained in:
parent
b8acce115f
commit
1a440e3a83
3 changed files with 26 additions and 2 deletions
13
Tunnel.cpp
13
Tunnel.cpp
|
@ -489,6 +489,19 @@ namespace tunnel
|
|||
if (ts > tunnel->GetCreationTime () + TUNNEL_CREATION_TIMEOUT)
|
||||
{
|
||||
LogPrint ("Pending tunnel build request ", it->first, " timeout. Deleted");
|
||||
// update stats
|
||||
auto config = tunnel->GetTunnelConfig ();
|
||||
if (config)
|
||||
{
|
||||
auto hop = config->GetFirstHop ();
|
||||
while (hop)
|
||||
{
|
||||
if (hop->router)
|
||||
hop->router->GetProfile ()->TunnelNonReplied ();
|
||||
hop = hop->next;
|
||||
}
|
||||
}
|
||||
// delete
|
||||
it = pendingTunnels.erase (it);
|
||||
m_NumFailedTunnelCreations++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue