fix: always move duplicate peer_info to graveyard pool (#5941)

This commit is contained in:
Yat Ho 2023-09-11 10:12:11 +08:00 committed by GitHub
parent ebb1b775af
commit d566695b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -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;
}