From 58612a1b7943569ddfb98be6980d7881136d90b4 Mon Sep 17 00:00:00 2001 From: "aofa.liu" Date: Thu, 9 Jul 2026 19:16:31 +0800 Subject: [PATCH] fix: register MqttClient::subscribe ack callback regardless of QoS value --- mqtt/mqtt_client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mqtt/mqtt_client.h b/mqtt/mqtt_client.h index 4211ddbc8..ec9110f41 100644 --- a/mqtt/mqtt_client.h +++ b/mqtt/mqtt_client.h @@ -250,7 +250,7 @@ class MqttClient { int subscribe(const char* topic, int qos = 0, MqttCallback ack_cb = NULL) { int mid = mqtt_client_subscribe(client, topic, qos); - if (qos > 0 && mid >= 0 && ack_cb) { + if (mid >= 0 && ack_cb) { setAckCallback(mid, ack_cb); } return mid;