tiny: do not announce if starting paused

This commit is contained in:
Igor Katson 2024-02-28 20:06:02 +00:00
parent 8594a477ee
commit 340d54eafa
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -758,14 +758,10 @@ impl Session {
let opts = opts.unwrap_or_default();
let announce_port = if opts.list_only {
None
} else {
self.tcp_listen_port
};
let paused = opts.list_only || opts.paused;
let announce_port = if paused { None } else { self.tcp_listen_port };
// The main difference between magnet link and torrent file, is that we need to resolve the magnet link
// into a torrent file by connecting to peers that support extended handshakes.
// So we must discover at least one peer and connect to it to be able to proceed further.