Chat here about code rewrites, mods, etc... with respect to the github project

Moderator: igrr

User avatar
By Robinson Mesino
#45400 Hello, I'm using this library --> and i'm trying to implement an small personal project using an esp8266 -- ESP-12 module, the project consists in activate/deactivate relay using a button, and notify to an MQTT Server the status (activate/deactivate) on every button press, so, my question is if exists some form to use WifiClient in async mode, because some times the connect method blocks the button (activate/deactivate relay) logic, for example, some publish to MQTT server blocks a little the button logic like a lag, or for example if the MQTT server IP is down, then the button logic is blocked for long times because the connect method of WifiClient class is trying to connect.

I found this issue --> that refers to the async issue, but i can't found this implementation in the last release code of the library...

Am doing something wrong ? or can i implement this project differently ?

User avatar
By noliver
#92866 Would you mind sharing your code? I am facing the exact same problem. If you don't want to share your code, it would be helpful if you could tell me how you refactored your code. Especially what you put inside the interrupt. I read that you should only do some light work inside an interrupt, like setting a variable or something.