serenity-rs / songbird

An async Rust library for the Discord voice API
ISC License
394 stars 116 forks source link

Driver: periodically prune `SsrcState`s from UDP Rx's decoder_map #133

Closed FelixMcFelix closed 2 years ago

FelixMcFelix commented 2 years ago

Currently, we don't prune old OpusDecoders from calls in response to either long timeouts or to disconnect events. As each of these is quite large, this can add up in long calls over many servers.

Each SsrcState should ideally be removed once a user leaves the call, or after a configurable timeout.