1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

Merge branch 'mqtt-fix-thread' into 'master'

use warnings instead of errors in async mqtt thread

See merge request acs/public/villas/VILLASnode!54
This commit is contained in:
Steffen Vogel 2019-10-26 14:27:15 +02:00
commit c200ecc326

View file

@ -57,13 +57,13 @@ static void * mosquitto_loop_thread(void *ctx)
ret = mosquitto_reconnect(m->client); ret = mosquitto_reconnect(m->client);
if (ret != MOSQ_ERR_SUCCESS) if (ret != MOSQ_ERR_SUCCESS)
error("MQTT: reconnection to broker failed for node %s: %s", node_name(node), mosquitto_strerror(ret)); warning("MQTT: reconnection to broker failed for node %s: %s", node_name(node), mosquitto_strerror(ret));
else else
warning("MQTT: successfully reconnected to broker for node %s: %s", node_name(node), mosquitto_strerror(ret)); warning("MQTT: successfully reconnected to broker for node %s: %s", node_name(node), mosquitto_strerror(ret));
ret = mosquitto_loop(m->client, -1, 1); ret = mosquitto_loop(m->client, 0, 1);
if (ret != MOSQ_ERR_SUCCESS) if (ret != MOSQ_ERR_SUCCESS)
error("MQTT: persisting connection error for node %s: %s", node_name(node), mosquitto_strerror(ret)); warning("MQTT: persisting connection error for node %s: %s", node_name(node), mosquitto_strerror(ret));
} }
} }
} }