make sure we don't download pieces while the torrent is checking
This commit is contained in:
parent
49f74be42f
commit
4ae349f61f
|
@ -3292,6 +3292,13 @@ namespace libtorrent
|
|||
return;
|
||||
}
|
||||
|
||||
// we can't download pieces in these states
|
||||
if (t->state() == torrent_status::checking_files
|
||||
|| t->state() == torrent_status::checking_resume_data
|
||||
|| t->state() == torrent_status::downloading_metadata
|
||||
|| t->state() == torrent_status::allocating)
|
||||
return;
|
||||
|
||||
if ((int)m_download_queue.size() >= m_desired_queue_size
|
||||
|| t->upload_mode()) return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue