forked from premiere/premiere-libtorrent
fix for when removing a torrent when it is in the checking state
This commit is contained in:
parent
8f7a3ddfe0
commit
65c4b7ec13
|
@ -1891,7 +1891,7 @@ namespace aux {
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
sha1_hash i_hash = t.torrent_file().info_hash();
|
sha1_hash i_hash = t.torrent_file().info_hash();
|
||||||
#endif
|
#endif
|
||||||
i->second->set_queue_position(-1);
|
t.set_queue_position(-1);
|
||||||
m_torrents.erase(i);
|
m_torrents.erase(i);
|
||||||
std::list<boost::shared_ptr<torrent> >::iterator k
|
std::list<boost::shared_ptr<torrent> >::iterator k
|
||||||
= std::find(m_queued_for_checking.begin(), m_queued_for_checking.end(), tptr);
|
= std::find(m_queued_for_checking.begin(), m_queued_for_checking.end(), tptr);
|
||||||
|
|
|
@ -784,7 +784,7 @@ namespace libtorrent
|
||||||
// we're done, or encounter a failure
|
// we're done, or encounter a failure
|
||||||
if (ret == piece_manager::need_full_check) return;
|
if (ret == piece_manager::need_full_check) return;
|
||||||
|
|
||||||
m_ses.done_checking(shared_from_this());
|
if (!m_abort) m_ses.done_checking(shared_from_this());
|
||||||
files_checked();
|
files_checked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1625,6 +1625,9 @@ namespace libtorrent
|
||||||
m_storage->async_release_files(
|
m_storage->async_release_files(
|
||||||
bind(&torrent::on_files_released, shared_from_this(), _1, _2));
|
bind(&torrent::on_files_released, shared_from_this(), _1, _2));
|
||||||
|
|
||||||
|
if (m_state == torrent_status::checking_files)
|
||||||
|
m_ses.done_checking(shared_from_this());
|
||||||
|
|
||||||
m_owning_storage = 0;
|
m_owning_storage = 0;
|
||||||
m_host_resolver.cancel();
|
m_host_resolver.cancel();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue