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

vmq_tracer: Do not crash when formatting topics without QoS on Unsubs… #2203

Merged
merged 1 commit into from Sep 28, 2023

Conversation

gmalkas
Copy link
Contributor

@gmalkas gmalkas commented Sep 27, 2023

The Tracer crashes when formatting the list of topics for a Unsubscribe packet.
When handling a Unsubscribe packet, the topics will not have a QoS, but the formatting
function, which is shared with Subscribe, expects a QoS for every topic.

Proposed Changes

This bugfix simply adds a function clause to handle cases where we only have a topic,
with no QoS and no subscription options. The formatting is kept similar to other cases
for consistency.

Types of Changes

  • [ x] Bugfix (non-breaking change which fixes issue #XXXX)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, styles...)
  • DevOps (Build scripts, pipelines...)

Checklist

  • I have read the CODE_OF_CONDUCT.md document
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if needed)
  • Any dependent changes have been merged and published in related repositories
  • I have updated changelog (At the bottom of the release version)
  • I have squashed all my commits into one before merging

…cribe

When handling a Unsubscribe packet, the topics will not have a QoS.
@gmalkas gmalkas force-pushed the bugfix/tracer-unsubscribe-crash branch from 6f4f10e to b7a59de Compare September 27, 2023 14:05
@ioolkos
Copy link
Contributor

ioolkos commented Sep 27, 2023

@gmalkas I see, thanks!

@ioolkos ioolkos merged commit e6c18e3 into vernemq:main Sep 28, 2023
9 of 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.

None yet

2 participants