diff --git a/include/libtorrent/session_settings.hpp b/include/libtorrent/session_settings.hpp index a8b2091f6..d7a4f88c1 100644 --- a/include/libtorrent/session_settings.hpp +++ b/include/libtorrent/session_settings.hpp @@ -106,6 +106,7 @@ namespace libtorrent , lazy_bitfields(true) , inactivity_timeout(600) , unchoke_interval(20) + , num_want(200) #ifndef TORRENT_DISABLE_DHT , use_dht_as_fallback(true) #endif @@ -242,6 +243,9 @@ namespace libtorrent // tracker in the ip= parameter. address announce_ip; + // the num want sent to trackers + int num_want; + #ifndef TORRENT_DISABLE_DHT // while this is true, the dht will note be used unless the // tracker is online diff --git a/src/torrent.cpp b/src/torrent.cpp index 629045cce..2e7e740db 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1352,7 +1352,7 @@ namespace libtorrent if (m_event != tracker_request::stopped) m_event = tracker_request::none; req.url = m_trackers[m_currently_trying_tracker].url; - req.num_want = 50; + req.num_want = m_settings.num_want; // if we are aborting. we don't want any new peers if (req.event == tracker_request::stopped) req.num_want = 0;