Skip to content

Commit

Permalink
Merge branch 'fix/error_codes' into 'master'
Browse files Browse the repository at this point in the history
fix: regard reason codes greater than 0x80 as failures.

See merge request espressif/esp-mqtt!205
  • Loading branch information
euripedesrocha committed Apr 5, 2024
2 parents 1edd167 + e7b9aa5 commit aa6f889
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mqtt_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ static esp_err_t deliver_suback(esp_mqtt_client_handle_t client)
client->event.error_handle->connect_return_code = MQTT_CONNECTION_ACCEPTED;
// post data event
for (int topic = 0; topic < msg_data_len; ++topic) {
if ((uint8_t)msg_data[topic] == 0x80) {
if ((uint8_t)msg_data[topic] >= 0x80) {
client->event.error_handle->error_type = MQTT_ERROR_TYPE_SUBSCRIBE_FAILED;
break;
}
Expand Down

0 comments on commit aa6f889

Please sign in to comment.