mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-19 05:19:57 +00:00
lower SSU2 resend traffic spikes
This commit is contained in:
parent
530a078535
commit
0236769134
@ -21,8 +21,8 @@ namespace transport
|
||||
{
|
||||
const int SSU2_TERMINATION_CHECK_TIMEOUT = 25; // in seconds
|
||||
const int SSU2_CLEANUP_INTERVAL = 72; // in seconds
|
||||
const int SSU2_RESEND_CHECK_TIMEOUT = 400; // in milliseconds
|
||||
const int SSU2_RESEND_CHECK_TIMEOUT_VARIANCE = 100; // in milliseconds
|
||||
const int SSU2_RESEND_CHECK_TIMEOUT = 40; // in milliseconds
|
||||
const int SSU2_RESEND_CHECK_TIMEOUT_VARIANCE = 10; // in milliseconds
|
||||
const int SSU2_RESEND_CHECK_MORE_TIMEOUT = 10; // in milliseconds
|
||||
const size_t SSU2_MAX_RESEND_PACKETS = 128; // packets to resend at the time
|
||||
const uint64_t SSU2_SOCKET_MIN_BUFFER_SIZE = 128 * 1024;
|
||||
|
@ -537,7 +537,7 @@ namespace transport
|
||||
if (m_SentPackets.empty ()) return 0;
|
||||
std::map<uint32_t, std::shared_ptr<SSU2SentPacket> > resentPackets;
|
||||
for (auto it = m_SentPackets.begin (); it != m_SentPackets.end (); )
|
||||
if (ts >= it->second->sendTime + it->second->numResends*m_RTO)
|
||||
if (ts >= it->second->sendTime + (it->second->numResends + 1) * m_RTO)
|
||||
{
|
||||
if (it->second->numResends > SSU2_MAX_NUM_RESENDS)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user