From a9c486d7a1233998ad729dd055b5112ec31cec39 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 9 Jul 2024 10:51:22 -0400 Subject: [PATCH] fixed stream hanging due to inactivity. Smoother RTT --- libi2pd/Streaming.cpp | 2 +- libi2pd/Streaming.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 37e5c986..b2aace6f 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -1167,7 +1167,7 @@ namespace stream if (m_IsNAcked) ScheduleSend (); } else - ScheduleSend (); + SendBuffer (); if (!m_IsNAcked) ScheduleResend (); } diff --git a/libi2pd/Streaming.h b/libi2pd/Streaming.h index 8da87d61..309ad6ff 100644 --- a/libi2pd/Streaming.h +++ b/libi2pd/Streaming.h @@ -56,7 +56,7 @@ namespace stream const int INITIAL_WINDOW_SIZE = 10; const int MIN_WINDOW_SIZE = 1; const int MAX_WINDOW_SIZE = 128; - const double RTT_EWMA_ALPHA = 0.9; + const double RTT_EWMA_ALPHA = 0.8; const int MIN_RTO = 20; // in milliseconds const int INITIAL_RTT = 8000; // in milliseconds const int INITIAL_RTO = 9000; // in milliseconds