zhouhan0126 / WIFIMANAGER-ESP32

wifimanager-esp32
MIT License
401 stars 135 forks source link

is there a handler for onDisconnect wifi connections? #7

Open jhonoryza opened 6 years ago

jhonoryza commented 6 years ago

i need to execute a function when wifi connections disconnect..

DevSpur commented 6 years ago

@jhonoryza Hi have you found a solution yet or still waiting

karan6190 commented 6 years ago

Hey @jhonoryza you can just add your function in WiFiManager.cpp file

if (connectWifi(_ssid, _pass) != WL_CONNECTED) { DEBUG_WM(F("Failed to connect.")); your Function() }

But make sure every time wifi connectivity has gone, your function will be executed. So over there you have to design your handler own.