mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
reset termination timer for new incoming connection
This commit is contained in:
@@ -381,8 +381,6 @@ namespace transport
|
|||||||
void NTCP2Session::Close ()
|
void NTCP2Session::Close ()
|
||||||
{
|
{
|
||||||
m_Socket.close ();
|
m_Socket.close ();
|
||||||
SetTerminationTimeout (NTCP2_ESTABLISH_TIMEOUT);
|
|
||||||
m_LastActivityTimestamp = i2p::util::GetSecondsSinceEpoch ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NTCP2Session::TerminateByTimeout ()
|
void NTCP2Session::TerminateByTimeout ()
|
||||||
@@ -753,6 +751,8 @@ namespace transport
|
|||||||
|
|
||||||
void NTCP2Session::ServerLogin ()
|
void NTCP2Session::ServerLogin ()
|
||||||
{
|
{
|
||||||
|
SetTerminationTimeout (NTCP2_ESTABLISH_TIMEOUT);
|
||||||
|
m_LastActivityTimestamp = i2p::util::GetSecondsSinceEpoch ();
|
||||||
m_Establisher->CreateEphemeralKey ();
|
m_Establisher->CreateEphemeralKey ();
|
||||||
boost::asio::async_read (m_Socket, boost::asio::buffer(m_Establisher->m_SessionRequestBuffer, 64), boost::asio::transfer_all (),
|
boost::asio::async_read (m_Socket, boost::asio::buffer(m_Establisher->m_SessionRequestBuffer, 64), boost::asio::transfer_all (),
|
||||||
std::bind(&NTCP2Session::HandleSessionRequestReceived, shared_from_this (),
|
std::bind(&NTCP2Session::HandleSessionRequestReceived, shared_from_this (),
|
||||||
|
|||||||
Reference in New Issue
Block a user