Replies: 3 comments 1 reply
-
This is a good improvement. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Any hint on how to compile just mqttv4? My first attemps have been unsuccessful (the "MStar MSC3XX SDK.zip" I found has no "arm-hisiv300-linux-gcc" command, used in mqttv4 makefile). |
Beta Was this translation helpful? Give feedback.
1 reply
-
I opened a pull request with a different approach |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I think that mqttv4 shouldn't die if it cannot connect, but should keep trying.
mqttv4.c does this here
in turn mqtt_connect tries to connect MAX_RETRIES*10 and gives a failure if it cannot connect.
However, if the first connection succeeds, then, even if it's interrupted, it will be retried indefinitely
I think that even the first connection should do the same. My use case is a camera connected to a cellular hotspot, so the connection can be spotty and if there's no connection established when mqttv4 starts it will eventually die.
Maybe it would be enough to just remove the
&& retries<=(MAX_RETRY*10)
conditions from both loops in mqtt_connect (though I'm not sure about the second one calling mosquitto_loop even if the connection failed).Beta Was this translation helpful? Give feedback.
All reactions