1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

fix: allow unreachable peers to be retried (#6975)

`tr_peer_info::reconnect_interval_has_passed()` contains logic to increase the reconnect interval for unreachable peers, but it has no effect at all currently because they wouldn't be tried in the first place.
This commit is contained in:
Yat Ho 2024-11-09 02:44:27 +08:00 committed by GitHub
parent 49f4c604da
commit 5a881191d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2427,12 +2427,6 @@ namespace connect_helpers
/* is this atom someone that we'd want to initiate a connection to? */ /* is this atom someone that we'd want to initiate a connection to? */
[[nodiscard]] bool is_peer_candidate(tr_torrent const* tor, tr_peer_info const& peer_info, time_t const now) [[nodiscard]] bool is_peer_candidate(tr_torrent const* tor, tr_peer_info const& peer_info, time_t const now)
{ {
// have we already tried and failed to connect?
if (auto const conn = peer_info.is_connectable(); conn && !*conn)
{
return false;
}
// not if we're both upload only and pex is disabled // not if we're both upload only and pex is disabled
if (tor->is_done() && peer_info.is_upload_only() && !tor->allows_pex()) if (tor->is_done() && peer_info.is_upload_only() && !tor->allows_pex())
{ {