mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-17 04:41:48 +02:00
send ping every keealive interval for client tunnels
This commit is contained in:
parent
b10e5ce358
commit
2eded7cdd7
6 changed files with 82 additions and 6 deletions
libi2pd_client
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2013-2020, The PurpleI2P Project
|
||||
* Copyright (c) 2013-2021, The PurpleI2P Project
|
||||
*
|
||||
* This file is part of Purple i2pd project and licensed under BSD3
|
||||
*
|
||||
|
@ -652,6 +652,13 @@ namespace client
|
|||
auto tun = std::make_shared<I2PClientTunnel> (name, dest, address, port, localDestination, destinationPort);
|
||||
clientTunnel = tun;
|
||||
clientEndpoint = tun->GetLocalEndpoint ();
|
||||
|
||||
uint32_t keepAlive = section.second.get<uint32_t>(I2P_CLIENT_TUNNEL_KEEP_ALIVE_INTERVAL, 0);
|
||||
if (keepAlive)
|
||||
{
|
||||
tun->SetKeepAliveInterval (keepAlive);
|
||||
LogPrint(eLogInfo, "Clients: I2P Client tunnel keep alive interval set to ", keepAlive);
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t timeout = section.second.get<uint32_t>(I2P_CLIENT_TUNNEL_CONNECT_TIMEOUT, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue