File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 22 * @Author: jiejie
33 * @Github: https://github.com/jiejieTop
44 * @Date: 2019-12-09 21:31:25
5- * @LastEditTime: 2020-11-05 16:02:47
5+ * @LastEditTime: 2021-01-14 10:00:12
66 * @Description: the code belongs to jiejie, please keep the author information and source code according to the license.
77 */
88#include "mqttclient.h"
@@ -1360,8 +1360,8 @@ int mqtt_unsubscribe(mqtt_client_t* c, const char* topic_filter)
13601360 if ((rc = mqtt_send_packet (c , len , & timer )) != MQTT_SUCCESS_ERROR )
13611361 goto exit ;
13621362
1363- /* create a message and record it */
1364- msg_handler = mqtt_msg_handler_create (( const char * ) topic_filter , QOS0 , NULL );
1363+ /* get a already subscribed message handler */
1364+ msg_handler = mqtt_get_msg_handler ( c , & topic );
13651365 if (NULL == msg_handler ) {
13661366 rc = MQTT_MEM_NOT_ENOUGH_ERROR ;
13671367 goto exit ;
You can’t perform that action at this time.
0 commit comments