From 1a9e11d86daf5ccf5c11161fd9db9c1622f82819 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 18 Jan 2021 12:58:27 -0500 Subject: [PATCH] don't send updated LeaseSet through a terminated session --- libi2pd/Streaming.cpp | 4 +++- libi2pd/Streaming.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index a873a660..0d482303 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -817,7 +817,7 @@ namespace stream void Stream::SendUpdatedLeaseSet () { - if (m_RoutingSession) + if (m_RoutingSession && !m_RoutingSession->IsTerminated ()) { if (m_RoutingSession->IsLeaseSetNonConfirmed ()) { @@ -838,6 +838,8 @@ namespace stream SendQuickAck (); } } + else + SendQuickAck (); } void Stream::ScheduleResend () diff --git a/libi2pd/Streaming.h b/libi2pd/Streaming.h index ab3c4439..fe035136 100644 --- a/libi2pd/Streaming.h +++ b/libi2pd/Streaming.h @@ -61,7 +61,7 @@ namespace stream const int SYN_TIMEOUT = 200; // how long we wait for SYN after follow-on, in milliseconds const size_t MAX_PENDING_INCOMING_BACKLOG = 128; const int PENDING_INCOMING_TIMEOUT = 10; // in seconds - const int MAX_RECEIVE_TIMEOUT = 30; // in seconds + const int MAX_RECEIVE_TIMEOUT = 20; // in seconds struct Packet {