mirror of
https://github.com/transmission/transmission
synced 2025-02-23 22:50:41 +00:00
(libT) tweak getMaxAtomCount()
This commit is contained in:
parent
bff4a98fa6
commit
4d627b79c2
1 changed files with 1 additions and 5 deletions
|
@ -3713,11 +3713,7 @@ compareAtomPtrsByShelfDate (const void * va, const void *vb)
|
||||||
static int
|
static int
|
||||||
getMaxAtomCount (const tr_torrent * tor)
|
getMaxAtomCount (const tr_torrent * tor)
|
||||||
{
|
{
|
||||||
const int n = tor->maxConnectedPeers;
|
return MIN (50, tor->maxConnectedPeers * 3);
|
||||||
/* approximate fit of the old jump discontinuous function */
|
|
||||||
if (n >= 55) return n + 150;
|
|
||||||
if (n >= 20) return 2 * n + 95;
|
|
||||||
return 4 * n + 55;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue