server icon indicating copy to clipboard operation
server copied to clipboard

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

Open SimonMacIntyre opened this issue 6 months ago • 1 comments

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 https://github.com/mochi-mqtt/server/issues/465

SimonMacIntyre avatar Jun 09 '25 16:06 SimonMacIntyre

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%
<!-- Total: 16 20
Files with Coverage Reduction New Missed Lines %
server.go 1 98.97%
<!-- Total: 1
Totals Coverage Status
Change from base Build 13605453911: 0.02%
Covered Lines: 6200
Relevant Lines: 6291

💛 - Coveralls

coveralls avatar Jun 09 '25 17:06 coveralls