rare request optimization

This commit is contained in:
Arvid Norberg 2008-07-09 18:01:00 +00:00
parent 22da6b5901
commit d51bdc0ec0
1 changed files with 6 additions and 0 deletions

View File

@ -2132,6 +2132,12 @@ namespace libtorrent
r.length = block_size;
m_request_queue.pop_front();
if (t->is_seed()) continue;
// this can happen if a block times out, is re-requested and
// then arrives "unexpectedly"
if (t->picker().is_finished(block) || t->picker().is_downloaded(block))
continue;
m_download_queue.push_back(block);
/*
#ifdef TORRENT_VERBOSE_LOGGING