From 28adb54c0a95b7134a5c5db35e7d3af3faba448b Mon Sep 17 00:00:00 2001 From: orignal Date: Sun, 18 Aug 2024 13:33:16 -0400 Subject: [PATCH] don't send quick ack for each duplicated packet --- libi2pd/Streaming.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index bc1672fe..2f4d5c21 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -237,8 +237,14 @@ namespace stream UpdateCurrentRemoteLease (); } m_PreviousReceivedSequenceNumber = receivedSeqn; - SendQuickAck (); // resend ack for previous message again m_LocalDestination.DeletePacket (packet); // packet dropped + if (!m_IsAckSendScheduled) + { + SendQuickAck (); // resend ack for previous message again + auto ackTimeout = m_RTT/10; + if (ackTimeout > m_AckDelay) ackTimeout = m_AckDelay; + ScheduleAck (ackTimeout); + } } else {