increase max num requessts to 12. Send more requests by 4 at the time

This commit is contained in:
orignal committed 2026-08-22 19:43:23 -04:00
1 parent f9b1666305
commit 3a96c9ca29
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -1150,7 +1150,8 @@ namespace torrents
}
}
if (m_NumRequests > 0) m_NumRequests--;
RequestNextBlocks ();
if (m_NumRequests <= MAX_NUM_REQUESTS*2/3)
RequestNextBlocks ();
// update stats
auto ts = i2p::util::GetMonotonicMilliseconds ();
if (m_LastBlockDownloadTimestamp)
+1 -1
View File
@@ -49,7 +49,7 @@ namespace torrents
constexpr int PEER_KEEP_ALIVE_TIMEOUT = 120; // in seconds
constexpr int PEER_KEEP_SEND_INTERVAL = 95; // in seconds
constexpr int PEER_KEEP_ALIVE_CHECK_INTERVAL = 15; // in seconds
constexpr size_t MAX_NUM_REQUESTS = 8;
constexpr size_t MAX_NUM_REQUESTS = 12;
constexpr size_t MAX_NUM_PIECES = 6;
constexpr int PIECE_INACTIVITY_TIMEOUT = 60; // in seconds
constexpr int TORRENTS_STATUS_UPDATE_INTERVAL = 25; // in seconds