piece picker priority fix
This commit is contained in:
parent
f054ae7c2d
commit
96ba6bc3b2
|
@ -357,11 +357,12 @@ namespace libtorrent
|
||||||
// the different priority levels
|
// the different priority levels
|
||||||
switch (piece_priority)
|
switch (piece_priority)
|
||||||
{
|
{
|
||||||
|
case 1: return prio;
|
||||||
case 2: return prio - 1;
|
case 2: return prio - 1;
|
||||||
case 3: return (std::max)(prio / 2, 1);
|
case 3: return (std::max)(prio / 2, 1);
|
||||||
case 4: return (std::max)(prio / 2 - 1, 1);
|
case 4: return (std::max)(prio / 2 - 1, 1);
|
||||||
case 5:
|
case 5: return (std::max)(prio / 3, 1);
|
||||||
case 6: return (std::min)(prio / 2 - 1, 2);
|
case 6: return (std::max)(prio / 3 - 1, 1);
|
||||||
case 7: return 1;
|
case 7: return 1;
|
||||||
}
|
}
|
||||||
return prio;
|
return prio;
|
||||||
|
|
Loading…
Reference in New Issue