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

Rescue async voice listening from mystery meat packets #624

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

BrandtHill
Copy link
Contributor

@BrandtHill BrandtHill commented Aug 15, 2024

So far we've had one case of a non-RTCP/non-RTP packet (at least not one that was properly encrypted) being received on the open UDP port, and this causes the Voice.Session to crash. I haven't encountered this in testing but this will protect against these edge cases occurring in the wild.

@jchristgit jchristgit self-assigned this Aug 16, 2024
Comment on lines 157 to 161
rescue
_error ->
Logger.warning(
"Received bad voice packet in guild_id #{state.guild_id}: #{inspect(packet)}"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still log the warning? I feel like this being a blanket rescue with no source of the error makes it hard to find out where it came from.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Log the exception is what I meant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, it will most likely be the same function clause error during the decrypt, but doesn't hurt. Someone's only seen this occur once.

@jchristgit jchristgit merged commit d0c62c9 into Kraigie:master Aug 22, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants