Whenever I unsubscribe from a topic, the client session is marked as disconnected.
After sending an UNSUBSCRIBE packet, I receive an UNSUBACK from the server. In the function cycle() (MQTTClient.c), readPacket() returns the packet type 11 (UNSUBACK). Since there is no defined case for UNSUBACK in the switch statement, the default path is taken. This sets the rc to the packet_type then jumps to the exit label. Since rc != SUCCESS, and the client is connected, the session is closed.
Is this expected behavior, or should there be a case statement for UNSUBACK that simply breaks?
Whenever I unsubscribe from a topic, the client session is marked as disconnected.
After sending an UNSUBSCRIBE packet, I receive an UNSUBACK from the server. In the function cycle() (MQTTClient.c), readPacket() returns the packet type 11 (UNSUBACK). Since there is no defined case for UNSUBACK in the switch statement, the default path is taken. This sets the rc to the packet_type then jumps to the exit label. Since rc != SUCCESS, and the client is connected, the session is closed.
Is this expected behavior, or should there be a case statement for UNSUBACK that simply breaks?