Do not switch an active download to initial_seed

`confirm_finished` did, and the `input_error` reached `main`.
This commit is contained in:
noctuum
2026-09-29 09:43:00 +05:00
committed by Jari Sundell
parent 366b936ded
commit dc916278c2
+4
View File
@@ -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));