From 56c1bb2a9e5511e0af5850de4c6aa618ca188611 Mon Sep 17 00:00:00 2001 From: reardonia <2925104+reardonia@users.noreply.github.com> Date: Mon, 6 Mar 2023 10:22:40 -0500 Subject: [PATCH] fix: publish 'leechers' iff it was in tracker response (#5164) --- libtransmission/announcer.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libtransmission/announcer.cc b/libtransmission/announcer.cc index 461fa436d..8155efb0f 100644 --- a/libtransmission/announcer.cc +++ b/libtransmission/announcer.cc @@ -1099,7 +1099,11 @@ void tr_announcer_impl::onAnnounceDone( publishPeersPex(tier, seeders, leechers, response.pex6); } - publishPeerCounts(tier, seeders, leechers); + /* Only publish leechers if it was actually returned during the announce */ + if (response.leechers >= 0) + { + publishPeerCounts(tier, seeders, leechers); + } tier->isRunning = is_running_on_success;