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

paho mqtt port does not send PUBLISH_COMPLETE message for QoS 2 #771

Open
YehonatanLiron opened this issue Apr 20, 2021 · 1 comment
Open

Comments

@YehonatanLiron
Copy link

The "cycle" function does not handle PUBLISH_RELEASE messages by sending PUBLISH_COMPLETE, so QoS 2 exchanges are not completed.

case MQTTPACKET_PUBREL:

        {
            unsigned short mypacketid;
            unsigned char dup, type;
            if (mqtt_deserialize_ack(&type, &dup, &mypacketid, c->readbuf, c->readbuf_size) != 1)
            {
                rc = MQTT_FAILURE;
            }
            else if ((len = mqtt_serialize_ack(c->buf, c->buf_size, MQTTPACKET_PUBCOMP, 0, mypacketid)) <= 0)
            {
                rc = MQTT_FAILURE;
            }
            else if ((rc = send_packet(c, len, timer)) != MQTT_SUCCESS) // send the MQTTPACKET_PUBCOMP packet
            {
                rc = MQTT_FAILURE; // there was a problem
            }
            if (rc == MQTT_FAILURE)
                goto exit; // there was a problem
            break;
        }
@lahirue
Copy link

lahirue commented Dec 26, 2021

Can you send me the flashing steps for esp mqtt client ?

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

2 participants