From e7b9aa5e6af1d8c86c8eb3a6087db0c34bdd4f60 Mon Sep 17 00:00:00 2001 From: zhouzb Date: Mon, 1 Apr 2024 10:37:42 +0800 Subject: [PATCH] fix: regard reason codes greater than 0x80 as failures. --- mqtt_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mqtt_client.c b/mqtt_client.c index d4c074a..f231224 100644 --- a/mqtt_client.c +++ b/mqtt_client.c @@ -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; }