-
Notifications
You must be signed in to change notification settings - Fork 492
Open
Description
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;
}
Metadata
Metadata
Assignees
Labels
No labels