Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver: Prune SsrcState after timeout/disconnect #145

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

FelixMcFelix
Copy link
Member

SsrcState objects are created on a per-user basis when "receive" is enabled, but were previously never destroyed. This PR adds some shared dashmaps for the WS task to communicate SSRC-to-ID mappings to the UDP Rx task, as well as any disconnections. Additionally, decoder state is pruned a default 1 minute after a user last speaks.

This was tested using cargo make ready and via examples/serenity/voice_receive/.

Closes #133

`SsrcState` objects are created on a per-user basis when "receive" is enabled, but were previously never destroyed. This PR adds some shared dashmaps for the WS task to communicate SSRC-to-ID mappings to the UDP Rx task, as well as any disconnections. Additionally, decoder state is pruned a default 1 minute after a user last speaks.

This was tested using `cargo make ready` and via `examples/serenity/voice_receive/`.

Closes serenity-rs#133
@FelixMcFelix FelixMcFelix marked this pull request as ready for review August 8, 2022 13:22
@FelixMcFelix FelixMcFelix added driver Relates to the driver or one of its sub-tasks. breaking Will either cause existing code to fail to compile, or cause substantial behaviour changes fix Fixes a bug or error receive Related to voice receive, decoding, decryption, or events labels Aug 8, 2022
@FelixMcFelix FelixMcFelix merged commit 5ce1308 into serenity-rs:next Aug 8, 2022
@FelixMcFelix FelixMcFelix deleted the prune-rx-state branch August 8, 2022 13:36
FelixMcFelix added a commit to FelixMcFelix/songbird that referenced this pull request Nov 20, 2023
`SsrcState` objects are created on a per-user basis when "receive" is enabled, but were previously never destroyed. This PR adds some shared dashmaps for the WS task to communicate SSRC-to-ID mappings to the UDP Rx task, as well as any disconnections. Additionally, decoder state is pruned a default 1 minute after a user last speaks.

This was tested using `cargo make ready` and via `examples/serenity/voice_receive/`.

Closes serenity-rs#133
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Will either cause existing code to fail to compile, or cause substantial behaviour changes driver Relates to the driver or one of its sub-tasks. fix Fixes a bug or error receive Related to voice receive, decoding, decryption, or events
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant