From d566695b33b1ba2dbde5cc8171ae139979436320 Mon Sep 17 00:00:00 2001 From: Yat Ho Date: Mon, 11 Sep 2023 10:12:11 +0800 Subject: [PATCH] fix: always move duplicate peer_info to graveyard pool (#5941) --- libtransmission/peer-mgr.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libtransmission/peer-mgr.cc b/libtransmission/peer-mgr.cc index 5f79e9040..34ae60394 100644 --- a/libtransmission/peer-mgr.cc +++ b/libtransmission/peer-mgr.cc @@ -746,11 +746,8 @@ private: TR_ASSERT(it != std::end(peers)); (*it)->do_purge = true; - if (was_connectable) - { - // Note that it_that is invalid after this point - graveyard_pool.insert(connectable_pool.extract(it_that)); - } + // Note that it_that is invalid after this point + graveyard_pool.insert(connectable_pool.extract(it_that)); return false; }