Closed real-bombinho closed 1 year ago
I have altered the PR to include the fix for #84 already. This might save you having to test twice. The fix for #84 was borrowed from this PR anyway, I just had originally kept the bit manipulation out your code as I was not sure if the omission was intentionally. The revised PR has the fix moved up a few lines to take effect in the earlier code too and corrected a mistake I had made (&& instead of &).
Instead of using PublishID() it would also be possible to fetch the ID bytes straight from [payload], this would prevent misuse of PublishID() out of context.
Thans for the PR, I'm closing it but have reflected changes with a unit test in https://github.com/hsaturn/TinyMqtt/commit/90435b1260568f1c5da07148903ae54f1c4cc0a4
Suggestion as per discussion.
It solves duplicate packets