Skip to content

Commit 4c1d7ff

Browse files
committed
Use a random client id so multiple instances can connect simultaneously
https://stackoverflow.com/questions/59625907/how-to-handle-multiple-clients-with-same-id-in-mosquitto-mqtt
1 parent 1bb93fd commit 4c1d7ff

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

TODO

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- FEATURE: provide binaries built with CI
12
- BUGFIX: automatically reconnect to MQTT broker when connection lost
23
- add program option --verbose instead of compile-time LOG_VERBOSE define
34
- test program with either --mqtt XOR --prometheus but not both

src/mqtt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int start_mqtt_thread(void *config_ptr) {
5656

5757
mosquitto_lib_init();
5858

59-
client = mosquitto_new("growatt-exporter", true, NULL);
59+
client = mosquitto_new(NULL, true, NULL);
6060
if (!client) {
6161
PERROR("Cannot create mosquitto client instance");
6262
return EXIT_FAILURE;

0 commit comments

Comments
 (0)