-
Notifications
You must be signed in to change notification settings - Fork 258
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
Possible bug on mqtt5 client when QoS>0 (IDFGH-10436) #261
Comments
@jmpmscorp Thanks for reporting it. We will fix it. |
@ESP-YJM |
@jmpmscorp Could you please use the latest MQTT components, maybe use IDF master branch to test the issue |
Sorry for delay @ESP-YJM , holiday time. I have tested again with IDF 5.3 release version, QoS2 and no more E (29216) Reason code -1 still printed. I know it will not affect but, maybe, in my opinion, it would be a good idea return another value than -1 that could be interpreted as unknown error and, certainly, it's not an error because it must be equal than 0x00. Thanks for your work. |
Enviroment
Description
Reason code on messages with QoS1 or QoS2 doesn't return 0x00 when brokers don't add reason code in PUBACK, PUBREL, PUBREC and PUBCOMP packets and its remaining length are exactly 2.
Tested with:
Code
Log on mosquitto, hivemq and eclipseproject free online test brokers.
Log on emqx free online test broker.
Yellow log message is the packet received by the broker. I add this line on
mqtt5_msg_get_reason_code
function. Same log with same local broker docker versions .With EMQX broker, message error
E (29216) mqtt5_client: Client send more than 20 QoS1 and QoS2 PUBLISH packet without no ack
is not shown.In OASIS mqtt specs in PUBACK, PUBREL, PUBREC and PUBCOMP packets we can find this:
It seems that mosquitto, hivemq and eclipse broker tested don't append reason code on success.
As can be checked in logs, when broker doesn't append reason code (yellow lines), returned value is -1 but, by specs, it should be 0x00.
I suppose that this -1 returned value is the cause that messages waiting to be confirmed by PUBxxx packets showE (29216) mqtt5_client: Client send more than 20 QoS1 and QoS2 PUBLISH packet without no ack
error.** Edit
After apply patch #243
E (29216) mqtt5_client: Client send more than 20 QoS1 and QoS2 PUBLISH packet without no ack
goes out on every brokerThe text was updated successfully, but these errors were encountered: