back-port the fix from the lgtm fixes in master

This commit is contained in:
Arvid Norberg 2018-10-19 16:27:42 +02:00 committed by Arvid Norberg
parent 269f0c5fb8
commit 12c52e8751
2 changed files with 3 additions and 3 deletions

View File

@ -84,10 +84,10 @@ namespace libtorrent
// is greater than the send quanta, and it has been unchoked for at least one minute
// then it's done with its upload slot, and we can de-prioritize it
bool c1_quota_complete = !lhs->is_choked()
&& c1 > t1->torrent_file().piece_length() * pieces
&& c1 > boost::int64_t(t1->torrent_file().piece_length()) * pieces
&& aux::time_now() - lhs->time_of_last_unchoke() > minutes(1);
bool c2_quota_complete = !rhs->is_choked()
&& c2 > t2->torrent_file().piece_length() * pieces
&& c2 > boost::int64_t(t2->torrent_file().piece_length()) * pieces
&& aux::time_now() - rhs->time_of_last_unchoke() > minutes(1);
// if c2 has completed a quanta, it should be de-prioritized

View File

@ -16,7 +16,7 @@ def clean():
'build-aux',
'.deps',
'test_tmp_*',
'bjam_build.*.xml'
'bjam_build.*.xml',
'*.exe',
'*.pdb',
'*.pyd',