counts newly started torrents as active up to 2 minutes, to give them a chance to start downloading. Active torrents are not considered slow in the auto manager.

This commit is contained in:
Arvid Norberg
2008-10-01 05:25:18 +00:00
parent acdcb262af
commit 1092c558e4
4 changed files with 25 additions and 1 deletions

View File

@@ -142,6 +142,7 @@ namespace libtorrent
, max_peerlist_size(8000)
, min_announce_interval(5 * 60)
, prioritize_partial_pieces(false)
, auto_manage_startup(120)
{}
// this is the user agent that will be sent to the tracker
@@ -441,6 +442,14 @@ namespace libtorrent
// if true, partial pieces are picked before pieces
// that are more rare
bool prioritize_partial_pieces;
// the number of seconds a torrent is considered
// active after it was started, regardless of
// upload and download speed. This is so that
// newly started torrents are not considered
// inactive until they have a fair chance to
// start downloading.
int auto_manage_startup;
};
#ifndef TORRENT_DISABLE_DHT

View File

@@ -217,6 +217,7 @@ namespace libtorrent
void pause();
void resume();
ptime started() const { return m_started; }
void do_pause();
void do_resume();