Make 'active_seeds' and 'active_downloads' use -1 as unlimited
This commit is contained in:
parent
24b24aff4e
commit
d70ec645d7
|
@ -3026,7 +3026,7 @@ the *QBone scavenger service*. For more details, see QBSS_.
|
|||
downloading torrents the queuing mechanism allows. The target number of active
|
||||
torrents is ``max(active_downloads, active_seeds)``. ``active_downloads`` and
|
||||
``active_seeds`` are upper limits on the number of downloading torrents and
|
||||
seeding torrents respectively.
|
||||
seeding torrents respectively. Setting the value to -1 will mean unlimited.
|
||||
|
||||
For example if there are 10 seeding torrents and 10 downloading torrents, and
|
||||
``active_downloads`` is 4 and ``active_seeds`` is 4, there will be no seed
|
||||
|
|
|
@ -1308,6 +1308,11 @@ namespace aux {
|
|||
int num_downloaders = settings().active_downloads;
|
||||
int num_seeds = settings().active_seeds;
|
||||
|
||||
if (num_downloaders == -1)
|
||||
num_downloaders = (std::numeric_limits<int>::max)();
|
||||
if (num_seeds == -1)
|
||||
num_seeds = (std::numeric_limits<int>::max)();
|
||||
|
||||
for (torrent_map::iterator i = m_torrents.begin()
|
||||
, end(m_torrents.end()); i != end; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue