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

the current implementain logic is just simply not work! #217

Open
dangbinghoo opened this issue Jan 7, 2021 · 2 comments
Open

the current implementain logic is just simply not work! #217

dangbinghoo opened this issue Jan 7, 2021 · 2 comments

Comments

@dangbinghoo
Copy link

hi there, has been integrated the current code to a iot project running with FreeRTOS + lwip, and found out the FreeRTOS verison of MQTTClient.c implementation is just wholly messed.

the cycle function just simply sign "not connected" and "clean all the subscribed topics" even when a simple error occured.

makes that the client just can connect to the broker and then simply ignores all received msg as you may receive a subscribe ack later in 1 second after sending the request, and sign "not connected" when running the MQTTYield will just cause you won't publish out any msg and return -1.

the all code logic is just weird.

@scaprile
Copy link
Contributor

scaprile commented Jan 7, 2021

Oh, if you happen to know more than the developers then please do it right and send a pull request!

@CIPop
Copy link

CIPop commented Jul 19, 2023

the cycle function just simply sign "not connected" and "clean all the subscribed topics" even when a simple error occured. makes that the client just can connect to the broker and then simply ignores all received msg

This is the correct behavior according to the spec. See section 3.1.2.4.

We do need to check to see if this is happening if clean_session / clean_start are set to false, which would be a bug.

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

No branches or pull requests

3 participants