From de06931242d870fce3d62657260b87d56ea24a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Tue, 12 May 2020 15:24:57 +0200 Subject: [PATCH] aquatic_ws: in remove_inactive_connections, run shrink_to_fit on map --- TODO.md | 1 - aquatic_ws/src/lib/network.rs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO.md b/TODO.md index 501b2c8..77af82d 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,6 @@ * network * native_tls for wss support * handshake: deregister stream when applicable - * connection cleaning: shrink to fit * test * test full torrent transfer (offer-answer exchange) * torrent state cleaning diff --git a/aquatic_ws/src/lib/network.rs b/aquatic_ws/src/lib/network.rs index 6fac768..8a2e187 100644 --- a/aquatic_ws/src/lib/network.rs +++ b/aquatic_ws/src/lib/network.rs @@ -98,6 +98,8 @@ pub fn remove_inactive_connections( true } }); + + connections.shrink_to_fit(); }