From 5f10e5e7f4a71a5ae473efb0490f8b0cfe08c111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Tue, 2 Nov 2021 23:59:50 +0100 Subject: [PATCH] aquatic_udp: when cleaning peer maps, run shrink_to_fit --- aquatic_udp/src/lib/common/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aquatic_udp/src/lib/common/mod.rs b/aquatic_udp/src/lib/common/mod.rs index fc96aed..d448f5a 100644 --- a/aquatic_udp/src/lib/common/mod.rs +++ b/aquatic_udp/src/lib/common/mod.rs @@ -155,6 +155,8 @@ impl TorrentMaps { keep }); + torrent.peers.shrink_to_fit(); + !torrent.peers.is_empty() } }