Topic: Publish - Qos 2 early exit (should wait for PUBREL)
The Qos level 2 protocol sequence for Publishing is:
PUBLISH -> PUBREC -> PUBREL -> PUBCOMP
The MQTT v1.9.0 library exists (as SUCCESS) after sending the PUBREL and does not wait for the arrival of the PUBCOMP.
This early exit opens up the opportunity for the system to begin other transfers and then experiencing the unexpectant arrival of the PUBCOMP message.
As a gentle hint, the "waitMatchFound" (line 900 in mqtt_client.c) is set by the arrival of the PUBREC message,
so the library does not "wait_again" (line 996 in mqtt_client.c).
At the time of the premature exit, there is insufficient indications (in the library variables) that allow me to do an external work-around.
Could I kindly ask you to look into and resolve this issue, as it does lead to instability in our system.