From dc916278c26c88da190919959c92906ff8164f89 Mon Sep 17 00:00:00 2001 From: noctuum <25441068+noctuum@users.noreply.github.com> Date: Tue, 29 Sep 2026 09:43:00 +0500 Subject: [PATCH] Do not switch an active download to initial_seed `confirm_finished` did, and the `input_error` reached `main`. --- src/core/download_list.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/download_list.cc b/src/core/download_list.cc index 6006adb2..12b0e814 100644 --- a/src/core/download_list.cc +++ b/src/core/download_list.cc @@ -709,6 +709,10 @@ DownloadList::confirm_finished(Download* download) { if (choke_up.is_string_empty()) choke_up = rpc::call_command("protocol.choke_heuristics.up.seed", torrent::Object(), rpc::make_target(download)); if (choke_down.is_string_empty()) choke_down = rpc::call_command("protocol.choke_heuristics.down.seed", torrent::Object(), rpc::make_target(download)); + // libtorrent refuses initial seeding on an active download. + if (download->is_active() && conn_current.as_string() == "initial_seed") + conn_current = "seed"; + rpc::call_command("d.connection_current.set", conn_current, rpc::make_target(download)); rpc::call_command("d.up.choke_heuristics.set", choke_up, rpc::make_target(download)); rpc::call_command("d.down.choke_heuristics.set", choke_down, rpc::make_target(download));