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

Fixed TopicAlias functionality. #783

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Fixed TopicAlias functionality. #783

merged 1 commit into from
Jan 20, 2021

Conversation

redboltz
Copy link
Owner

The the TopicAlias map should be cleared on disconnection.
If the inflight message has the TopicAlias property, remove it.
If the inflight message has the empty TopicName and the TopicAlias,
the original TopicName is recovered from the TopicAlias at the first
sent, and remove TopicAlias property.

It works well with mosquitto MQTT broker.
The original mqtt_cpp implementation cause protocol error because of
using cleared topic alias on resend.

The the TopicAlias map should be cleared on disconnection.
If the inflight message has the TopicAlias property, remove it.
If the inflight message has the empty TopicName and the TopicAlias,
the original TopicName is recovered from the TopicAlias at the first
sent, and remove TopicAlias property.

It works well with mosquitto MQTT broker.
The original mqtt_cpp implementation cause protocol error because of
using cleared topic alias on resend.
@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #783 (cc8927a) into master (3cc8622) will decrease coverage by 0.12%.
The diff coverage is 82.84%.

@@            Coverage Diff             @@
##           master     #783      +/-   ##
==========================================
- Coverage   85.16%   85.03%   -0.13%     
==========================================
  Files          63       64       +1     
  Lines        8747     8932     +185     
==========================================
+ Hits         7449     7595     +146     
- Misses       1298     1337      +39     

@redboltz
Copy link
Owner Author

@redboltz
Copy link
Owner Author

Test with mosquitto broker has also been successfully finished.

@redboltz redboltz merged commit be8bf34 into master Jan 20, 2021
@redboltz redboltz deleted the fix_topic_alias branch January 20, 2021 09:16
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

1 participant