mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-22 04:24:51 +00:00
piece picker assert fix
This commit is contained in:
parent
0898680adc
commit
67e79250d2
1 changed files with 10 additions and 10 deletions
|
@ -962,16 +962,16 @@ namespace libtorrent
|
|||
int priority = p.priority(m_sequenced_download_threshold);
|
||||
TORRENT_ASSERT(priority < int(m_piece_info.size()));
|
||||
|
||||
TORRENT_ASSERT(p.downloading == 1);
|
||||
TORRENT_ASSERT(!p.have());
|
||||
|
||||
std::vector<downloading_piece>::iterator i
|
||||
= std::find_if(m_downloads.begin()
|
||||
, m_downloads.end()
|
||||
, has_index(index));
|
||||
TORRENT_ASSERT(i != m_downloads.end());
|
||||
erase_download_piece(i);
|
||||
p.downloading = 0;
|
||||
if (p.downloading)
|
||||
{
|
||||
std::vector<downloading_piece>::iterator i
|
||||
= std::find_if(m_downloads.begin()
|
||||
, m_downloads.end()
|
||||
, has_index(index));
|
||||
TORRENT_ASSERT(i != m_downloads.end());
|
||||
erase_download_piece(i);
|
||||
p.downloading = 0;
|
||||
}
|
||||
|
||||
TORRENT_ASSERT(std::find_if(m_downloads.begin(), m_downloads.end()
|
||||
, has_index(index)) == m_downloads.end());
|
||||
|
|
Loading…
Add table
Reference in a new issue