Browse Source

fixed stream hanging due to inactivity. Smoother RTT

pull/2076/head
orignal 5 months ago
parent
commit
a9c486d7a1
  1. 2
      libi2pd/Streaming.cpp
  2. 2
      libi2pd/Streaming.h

2
libi2pd/Streaming.cpp

@ -1167,7 +1167,7 @@ namespace stream
if (m_IsNAcked) ScheduleSend (); if (m_IsNAcked) ScheduleSend ();
} }
else else
ScheduleSend (); SendBuffer ();
if (!m_IsNAcked) ScheduleResend (); if (!m_IsNAcked) ScheduleResend ();
} }

2
libi2pd/Streaming.h

@ -56,7 +56,7 @@ namespace stream
const int INITIAL_WINDOW_SIZE = 10; const int INITIAL_WINDOW_SIZE = 10;
const int MIN_WINDOW_SIZE = 1; const int MIN_WINDOW_SIZE = 1;
const int MAX_WINDOW_SIZE = 128; 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 MIN_RTO = 20; // in milliseconds
const int INITIAL_RTT = 8000; // in milliseconds const int INITIAL_RTT = 8000; // in milliseconds
const int INITIAL_RTO = 9000; // in milliseconds const int INITIAL_RTO = 9000; // in milliseconds

Loading…
Cancel
Save