the code works fine but there are some changes needed:
They can still specify the 5 as the default value in the function definition. So users will not have to set it. Only the ones who need it would. For example: void connect(size_t maxRetries=5)
That way example code stays the same, but if a user wanted a specific retry count they could pass it as a parameter.
2)Also, don’t use global variables error_count
I rewrite file. For use restriction reconnect, it’s necessary write in arduino sketch file #define maxRetries 2 // max counter of reconnect
before #include <CayenneMQTT*.h>
After some day, one bug.
If i use Cayenne library, for connect to wifi, it’s not stab reconnect.
Library wrote “connect to ssid” and freeze.
If i use for connect, wifi library, it’s work good
Seems like this issue is not fixed yet?
Is kang2k code ready to be used? Or did You (Cayenne) issue any official update of Cayenne MQQT library?
I’m interested only in battery powered devices in noisy wifi environment and “blocking mode” is not acceptable.
Blynk can be connected in non-blocking mode, why not Cayenne?