only check for suback if using MQTT 3.1.1 or higher
This commit is contained in:
parent
b9c9a28883
commit
e70e2367b6
@ -125,7 +125,8 @@ int8_t Adafruit_MQTT::connect() {
|
||||
if (!sendPacket(buffer, len))
|
||||
return -1;
|
||||
|
||||
// Get SUBACK
|
||||
// Check for SUBACK if using MQTT 3.1.1 or higher
|
||||
if(MQTT_PROTOCOL_LEVEL > 3) {
|
||||
len = readPacket(buffer, 5, CONNECT_TIMEOUT_MS);
|
||||
DEBUG_PRINT(F("SUBACK:\t"));
|
||||
DEBUG_PRINTBUFFER(buffer, len);
|
||||
@ -134,6 +135,8 @@ int8_t Adafruit_MQTT::connect() {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user