From 24eec76428bd915232cfc9a2055db46bd43afdea Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 29 May 2017 02:16:57 -0400 Subject: [PATCH] more --- libi2pd/NTCPSession.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libi2pd/NTCPSession.cpp b/libi2pd/NTCPSession.cpp index d4847448..96d95ab6 100644 --- a/libi2pd/NTCPSession.cpp +++ b/libi2pd/NTCPSession.cpp @@ -1044,7 +1044,7 @@ namespace transport auto timer = std::make_shared(m_Service); auto timeout = NTCP_CONNECT_TIMEOUT * 5; - conn->SetTerminationTimeout(timeout); + conn->SetTerminationTimeout(timeout * 2); timer->expires_from_now (boost::posix_time::seconds(timeout)); timer->async_wait ([conn, timeout](const boost::system::error_code& ecode) { if (ecode != boost::asio::error::operation_aborted) @@ -1136,6 +1136,8 @@ namespace transport } else { + timer->cancel(); + conn->Terminate(); i2p::data::netdb.SetUnreachable (conn->GetRemoteIdentity ()->GetIdentHash (), true); } }