Closed alirezaimi closed 1 year ago
This is a known problem. The common Arduino APIs do not yet expose a way to set a connect timeout. Depending on your platform you might find a way to tweak the network implementation to use a lower timeout.
sad :(
Is setting timeout
in this option can help me ? void setOptions(int keepAlive, bool cleanSession, int timeout);
I can't find out any way because I can't understand the real problem cause my this issue :((((
Closing as stale. Please reopen if issue persists.
The main problem is still exist ! and the timeout option is very important option that when the internet connection lost handle this problem and pass it right away without any delayed .
what about this parameter (timeout) : void setOptions(int keepAlive, bool cleanSession, int timeout);
what is this option ?
Hi
When my internet connection lost, my loop function run every 9 seconds because stuck in mqtt connection and publish part of code. why ? and how can pass this part if internet connection lost and doest stuck in seconds that i define somewhere ? is there any param for connect method ?
in setup :
in loop :
and some where in my code define mqtt_connect func :