From 0c7992baa26eae13b21d2ec32bdfb5d320b0fd48 Mon Sep 17 00:00:00 2001 From: tearfur <46261767+tearfur@users.noreply.github.com> Date: Mon, 14 Aug 2023 22:56:43 +0800 Subject: [PATCH] fix: cover all pex disabled cases in `get_peer_candidate()` (#5806) --- libtransmission/peer-mgr.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libtransmission/peer-mgr.cc b/libtransmission/peer-mgr.cc index 18d247bc4..4ddc4f9d0 100644 --- a/libtransmission/peer-mgr.cc +++ b/libtransmission/peer-mgr.cc @@ -2321,10 +2321,10 @@ struct peer_candidate continue; } - /* if everyone in the swarm is seeds and pex is disabled because - * the torrent is private, then don't initiate connections */ + /* if everyone in the swarm is seeds and pex is disabled, + * then don't initiate connections */ bool const seeding = tor->is_done(); - if (seeding && swarm->is_all_seeds() && tor->is_private()) + if (seeding && swarm->is_all_seeds() && !tor->allows_pex()) { continue; }