mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
more
This commit is contained in:
parent
71c9b15ff1
commit
24eec76428
@ -1044,7 +1044,7 @@ namespace transport
|
|||||||
|
|
||||||
auto timer = std::make_shared<boost::asio::deadline_timer>(m_Service);
|
auto timer = std::make_shared<boost::asio::deadline_timer>(m_Service);
|
||||||
auto timeout = NTCP_CONNECT_TIMEOUT * 5;
|
auto timeout = NTCP_CONNECT_TIMEOUT * 5;
|
||||||
conn->SetTerminationTimeout(timeout);
|
conn->SetTerminationTimeout(timeout * 2);
|
||||||
timer->expires_from_now (boost::posix_time::seconds(timeout));
|
timer->expires_from_now (boost::posix_time::seconds(timeout));
|
||||||
timer->async_wait ([conn, timeout](const boost::system::error_code& ecode) {
|
timer->async_wait ([conn, timeout](const boost::system::error_code& ecode) {
|
||||||
if (ecode != boost::asio::error::operation_aborted)
|
if (ecode != boost::asio::error::operation_aborted)
|
||||||
@ -1136,6 +1136,8 @@ namespace transport
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
timer->cancel();
|
||||||
|
conn->Terminate();
|
||||||
i2p::data::netdb.SetUnreachable (conn->GetRemoteIdentity ()->GetIdentHash (), true);
|
i2p::data::netdb.SetUnreachable (conn->GetRemoteIdentity ()->GetIdentHash (), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user