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

Avoid panic when streaming packets are empty #1861

Merged
merged 4 commits into from
Jun 1, 2022

Conversation

junbl
Copy link
Contributor

@junbl junbl commented May 10, 2022

Same issue as #1667, but fixes another instance of panicking.

Where those changes added a check for .is_empty() before the access, I've just changed it to return an Err instead of the implicit panic.

I used a Error::Protocol since this seems to fit into "unexpected or invalid data", but another error type could make more sense.

@abonander abonander merged commit c744cb7 into launchbadge:master Jun 1, 2022
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.

3 participants