mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
adjust termination timeout
This commit is contained in:
@@ -12,7 +12,8 @@ namespace i2p
|
||||
namespace transport
|
||||
{
|
||||
SSUSession::SSUSession (SSUServer& server, boost::asio::ip::udp::endpoint& remoteEndpoint,
|
||||
std::shared_ptr<const i2p::data::RouterInfo> router, bool peerTest ): TransportSession (router),
|
||||
std::shared_ptr<const i2p::data::RouterInfo> router, bool peerTest ):
|
||||
TransportSession (router, SSU_TERMINATION_TIMEOUT),
|
||||
m_Server (server), m_RemoteEndpoint (remoteEndpoint), m_Timer (GetService ()),
|
||||
m_IsPeerTest (peerTest),m_State (eSessionStateUnknown), m_IsSessionKey (false),
|
||||
m_RelayTag (0),m_Data (*this), m_IsDataReceived (false)
|
||||
@@ -882,7 +883,7 @@ namespace transport
|
||||
void SSUSession::ScheduleTermination ()
|
||||
{
|
||||
m_Timer.cancel ();
|
||||
m_Timer.expires_from_now (boost::posix_time::seconds(SSU_TERMINATION_TIMEOUT));
|
||||
m_Timer.expires_from_now (boost::posix_time::seconds(GetTerminationTimeout ()));
|
||||
m_Timer.async_wait (std::bind (&SSUSession::HandleTerminationTimer,
|
||||
shared_from_this (), std::placeholders::_1));
|
||||
}
|
||||
@@ -891,7 +892,7 @@ namespace transport
|
||||
{
|
||||
if (ecode != boost::asio::error::operation_aborted)
|
||||
{
|
||||
LogPrint (eLogWarning, "SSU: no activity with ", m_RemoteEndpoint, " for ", SSU_TERMINATION_TIMEOUT, " seconds");
|
||||
LogPrint (eLogWarning, "SSU: no activity with ", m_RemoteEndpoint, " for ", GetTerminationTimeout (), " seconds");
|
||||
Failed ();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user