Commit aa108d71 authored by 957dd's avatar 957dd

Update mqtt.c

parent 98fb2c44
...@@ -296,7 +296,7 @@ int mqtt_create(struct mosquitto *mosq) //创建mqtt客服端 ...@@ -296,7 +296,7 @@ int mqtt_create(struct mosquitto *mosq) //创建mqtt客服端
if (rc != MOSQ_ERR_SUCCESS) { if (rc != MOSQ_ERR_SUCCESS) {
fprintf(stderr, "Failed to connect to broker: %s\n", mosquitto_strerror(rc)); fprintf(stderr, "Failed to connect to broker: %s\n", mosquitto_strerror(rc));
mosquitto_destroy(mosq); mosquitto_destroy(mosq);
return EXIT_FAILURE; //return EXIT_FAILURE;
} }
//mosquitto_subscribe_opt_set(mosq, TOPIC, strlen(TOPIC), 1, MOSQ_OPT_NO_LOCAL); //mosquitto_subscribe_opt_set(mosq, TOPIC, strlen(TOPIC), 1, MOSQ_OPT_NO_LOCAL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment