mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-14 22:22:31 +00:00
Added a new callback mechanism and use it for trackers.
This commit is contained in:
@@ -109,8 +109,8 @@ DownloadFactory::receive_load() {
|
||||
|
||||
HttpQueue::iterator itr = m_manager->http_queue()->insert(m_uri, m_stream);
|
||||
|
||||
itr->add_done_slot([this]() { receive_loaded(); });
|
||||
itr->add_failed_slot([this](const std::string& error) { receive_failed(error); });
|
||||
itr->add_done_slot(torrent::this_thread::thread(), [this]() { receive_loaded(); });
|
||||
itr->add_failed_slot(torrent::this_thread::thread(), [this](const std::string& error) { receive_failed(error); });
|
||||
|
||||
m_variables["tied_to_file"] = (int64_t)false;
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ HttpQueue::insert(const std::string& url, std::shared_ptr<std::ostream> stream)
|
||||
for (auto& slot : m_signal_insert)
|
||||
slot(*itr);
|
||||
|
||||
itr->add_done_slot([this, itr]() { erase(itr); });
|
||||
itr->add_failed_slot([this, itr](auto) { erase(itr); });
|
||||
itr->add_done_slot(torrent::this_thread::thread(), [this, itr]() { erase(itr); });
|
||||
itr->add_failed_slot(torrent::this_thread::thread(), [this, itr](auto) { erase(itr); });
|
||||
|
||||
// TODO: Downloading http torrents doesn't seem to work.
|
||||
// TODO: Quitting no longer works.
|
||||
|
||||
Reference in New Issue
Block a user