From b0af479ab9599ecfdf9256a6f047dad31f6b7c9c Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Tue, 4 Jun 2019 15:01:10 +0300 Subject: [PATCH] Disable "Upload mode" when start preloaded torrent --- src/base/bittorrent/session.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 2594d9b3c..bad167a31 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -2155,6 +2155,9 @@ bool Session::addTorrent_impl(CreateTorrentParams params, const MagnetUri &magne try { handle.auto_managed(false); + // Preloaded torrent is in "Upload mode" so we need to disable it + // otherwise the torrent never be downloaded (until application restart) + handle.set_upload_mode(false); handle.pause(); } catch (std::exception &) {}