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(); }