Blocking when cloud is down
I have my ESP8266 connected to aRest and when cloud.arest.io is down, like it is now, all other operations after rest.handle() on ESP are blocked.
I get the following on serial port: Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Attempting MQTT connection...failed, rc=-2 try again in 5 seconds
First, thanks for noticing, it's back up :) You mean you would like the check operation to be non blocking ?
Thanks for a [very] quick turnaround. One of the reasons I love aRest :)
For your second question, I'd have to admit my naivete and instead of offering a solution, let me elaborate on the problem.
I have a rest.handle(client); call in loop() method. If the cloud is down, nothing happens after that call because the process is (blocked?) on that call. I moved the call to the end of the loop and all operations in loop method complete for the first iteration but then I just see the above error repeated every 5 seconds. I am assuming, the call to handle() is blocking the process from returning to loop().
Hope this helps.
Welcome :) It would be good to not block the rest of the sketch indeed, I'll work on that.