Open
Description
Hi!
I use the latest version of the library (master). For tests I use test.mosquitto.org as MQTT broker. Here my code:
mqttc.subscribe((const char *)"TEST/device/+", MQTT::QOS2, cbFunc);
void cbFunc(MQTT::MessageData &md) {
MQTT::Message &msg = md.message;
printf("MQTT: qos %d, retained %d, dup %d, packetid %d", msg.qos, msg.retained, msg.dup, msg.id);
printf("Payload %.*s", msg.payloadlen, (char*)msg.payload);
}
After sending a message to the client:
$ mosquitto_pub -h test.mosquitto.org -p 8883 -t "TEST/device/1" -m "Hi!" --cafile ./mosquitto.org.crt -q 2 -d
Client mosq-picrhde0TAJrbDyccL sending CONNECT
Client mosq-picrhde0TAJrbDyccL received CONNACK (0)
Client mosq-picrhde0TAJrbDyccL sending PUBLISH (d0, q2, r0, m1, 'TEST/device/1', ... (3 bytes))
Client mosq-picrhde0TAJrbDyccL received PUBREC (Mid: 1)
Client mosq-picrhde0TAJrbDyccL sending PUBREL (m1)
Client mosq-picrhde0TAJrbDyccL received PUBCOMP (Mid: 1, RC:0)
Client mosq-picrhde0TAJrbDyccL sending DISCONNECT
the socket connection of the mbed-mqtt
client is lost. If I send a message with QOS1 or QOS0 there are no problems and all woks as expected (no socket connection lost).
Is this a bug in the library?
Metadata
Metadata
Assignees
Labels
No labels