forked from premiere/premiere-libtorrent
fixed #75
This commit is contained in:
parent
816bf3ff2d
commit
8aa37dfa39
|
@ -211,7 +211,9 @@ namespace libtorrent
|
||||||
fs::path save_path() const;
|
fs::path save_path() const;
|
||||||
|
|
||||||
void async_release_files(
|
void async_release_files(
|
||||||
boost::function<void(int, disk_io_job const&)> const& handler);
|
boost::function<void(int, disk_io_job const&)> const& handler
|
||||||
|
= boost::function<void(int, disk_io_job const&)>());
|
||||||
|
|
||||||
void async_move_storage(fs::path const& p
|
void async_move_storage(fs::path const& p
|
||||||
, boost::function<void(int, disk_io_job const&)> const& handler);
|
, boost::function<void(int, disk_io_job const&)> const& handler);
|
||||||
|
|
||||||
|
|
|
@ -1007,8 +1007,7 @@ namespace libtorrent
|
||||||
// disconnect all peers and close all
|
// disconnect all peers and close all
|
||||||
// files belonging to the torrents
|
// files belonging to the torrents
|
||||||
disconnect_all();
|
disconnect_all();
|
||||||
if (m_owning_storage.get()) m_storage->async_release_files(
|
if (m_owning_storage.get()) m_storage->async_release_files();
|
||||||
bind(&torrent::on_files_released, shared_from_this(), _1, _2));
|
|
||||||
m_owning_storage = 0;
|
m_owning_storage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2041,8 +2040,7 @@ namespace libtorrent
|
||||||
, bind(&peer_connection::disconnect, _1));
|
, bind(&peer_connection::disconnect, _1));
|
||||||
|
|
||||||
assert(m_storage);
|
assert(m_storage);
|
||||||
m_storage->async_release_files(
|
m_storage->async_release_files();
|
||||||
bind(&torrent::on_files_released, shared_from_this(), _1, _2));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// called when torrent is complete (all pieces downloaded)
|
// called when torrent is complete (all pieces downloaded)
|
||||||
|
|
Loading…
Reference in New Issue