Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A negative MQTT 5 PUBREC terminates a QoS 2 publish, but the client currently sends PUBREL and waits for PUBCOMP anyway. A broker that releases the rejected exchange can return PacketIdentifierNotFound, masking the original rejection as UnspecifiedError.
Return the original PUBREC reason code, reason string, and ordered user properties without sending PUBREL. Ignore late negative PUBRECs with no awaiter. Successful PUBRECs, including NoMatchingSubscribers, retain the existing handshake; MQTT 3 behavior is unchanged. No public signatures or target frameworks change.
The public wire tests cover all seven negative reason codes, a duplicate negative PUBREC followed by a PING barrier, MQTT 3 and MQTT 5 positive handshakes, and result projection without PUBCOMP. Against master 798a0e2, the unchanged 13-case harness records nine expected failures and four positive passes. This branch passes 13/13 on Linux and Windows under both .NET 8 and .NET 10, using the same Linux-built DLLs on Windows: https://github.com/YAJeff/MQTTnet/actions/runs/36792223162 (public-client-repro and public-client-windows jobs).
Protocol basis: MQTT 5 sections 4.3.3 and 4.4, including MQTT-4.3.3-4 and MQTT-4.4.0-2: https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html
This contribution contains only the client fix and public tests. It has no dependency on custom server persistence adapters. The cited workflow also runs separate fork qualification; those full-suite results are not claimed as upstream-master full-suite validation.