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

[parse] adding short disconnect msg support #292

Merged
merged 4 commits into from
May 22, 2024
Merged

Conversation

dscso
Copy link
Contributor

@dscso dscso commented May 21, 2024

@dscso
Copy link
Contributor Author

dscso commented May 21, 2024

Idk the second commit of the PR is much less important, but in a very data limited environment this could make sense if you are reopening the MQTT connection very often

@TheNeikos
Copy link
Owner

Ah good catch!

There is similar logic for this like this in the repo:

let reason = if input.is_empty() {
PubackReasonCode::Success
} else {
PubackReasonCode::parse(input)?
};
let properties = if input.is_empty() {
PubackProperties::new()
} else {
PubackProperties::parse(input)?
};

Do you think you could adapt it to this?

@dscso
Copy link
Contributor Author

dscso commented May 21, 2024

true, looks better :). Done

@TheNeikos TheNeikos merged commit 85a1b06 into TheNeikos:main May 22, 2024
2 checks passed
@TheNeikos
Copy link
Owner

Thank you!

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.

2 participants