mirror of
https://github.com/transmission/transmission
synced 2024-12-30 19:46:56 +00:00
fix: assertion failure in std::clamp() when called from rechokeDownloads() (#5080)
This commit is contained in:
parent
238fd96041
commit
ac319321b5
1 changed files with 3 additions and 2 deletions
|
@ -1832,8 +1832,9 @@ void rechokeDownloads(tr_swarm* s)
|
|||
}
|
||||
}
|
||||
|
||||
/* don't let the previous section's number tweaking go too far... */
|
||||
max_peers = std::clamp(max_peers, MinInterestingPeers, s->tor->peerLimit());
|
||||
// don't let the previous section's number tweaking go too far...
|
||||
max_peers = std::max(max_peers, MinInterestingPeers);
|
||||
max_peers = std::min(max_peers, s->tor->peerLimit());
|
||||
|
||||
s->max_peers = max_peers;
|
||||
|
||||
|
|
Loading…
Reference in a new issue