Skip to content

Fix QoS 2 message rejections to send PUBREC instead of PUBACK, allow errRejectPacket through #476

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

SimonMacIntyre
Copy link
Contributor

@SimonMacIntyre SimonMacIntyre commented Jun 9, 2025

Fix QoS 2 message rejections to send PUBREC instead of PUBACK and remove the errRejectPacket no-op check.

I am unsure why the line which I removed was there, but that was stopping that packet from falling through to the lower if block where it would have made a puback as needed for qos1. However, for qos2 it should be pubrec so I addressed that here too.

Link to spec

Fixes #465

@coveralls
Copy link

coveralls commented Jun 9, 2025

Pull Request Test Coverage Report for Build 15562075462

Details

  • 16 of 20 (80.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 98.553%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server.go 16 20 80.0%
Files with Coverage Reduction New Missed Lines %
server.go 1 98.97%
Totals Coverage Status
Change from base Build 13605453911: 0.02%
Covered Lines: 6200
Relevant Lines: 6291

💛 - Coveralls

@SimonMacIntyre SimonMacIntyre marked this pull request as ready for review June 9, 2025 17:08
@SimonMacIntyre SimonMacIntyre marked this pull request as draft June 10, 2025 10:50
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.

ErrRejectPacket should be returned in PubAck per v5 spec
2 participants