forked from premiere/premiere-libtorrent
handles case where a request in the allow fast set is rejected
This commit is contained in:
parent
2c71fa35d3
commit
c9d245e9f1
|
@ -730,6 +730,15 @@ namespace libtorrent
|
|||
<< " *** PIECE NOT IN REQUEST QUEUE\n";
|
||||
}
|
||||
#endif
|
||||
if (has_peer_choked())
|
||||
{
|
||||
// if we're choked and we got a rejection of
|
||||
// a piece in the allowed fast set, remove it
|
||||
// from the allow fast set.
|
||||
std::vector<int>::iterator i = std::find(
|
||||
m_allowed_fast.begin(), m_allowed_fast.end(), r.piece);
|
||||
if (i != m_allowed_fast.end()) m_allowed_fast.erase(i);
|
||||
}
|
||||
if (m_request_queue.empty())
|
||||
{
|
||||
if (m_download_queue.size() < 2)
|
||||
|
|
Loading…
Reference in New Issue