* New throttle implementation, works to a certain degree but still

needs some work.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@588 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-10-29 00:55:21 +00:00
parent da67bdfff1
commit 5137aade10
4 changed files with 16 additions and 15 deletions
+6 -6
View File
@@ -127,14 +127,14 @@ Root::receive_up_throttle(int t) {
torrent::set_up_throttle(throttle);
if (throttle == 0)
torrent::set_max_unchoked(0);
// if (throttle == 0)
// torrent::set_max_unchoked(0);
else if (throttle <= 10 << 10)
torrent::set_max_unchoked(1 + throttle / (1 << 10));
// else if (throttle <= 10 << 10)
// torrent::set_max_unchoked(1 + throttle / (1 << 10));
else
torrent::set_max_unchoked(10 + throttle / (5 << 10));
// else
// torrent::set_max_unchoked(10 + throttle / (5 << 10));
}
}