zhouhan0126/WIFIMANAGER-ESP32

is there a handler for onDisconnect wifi connections?

jhonoryza opened this issue · 2 comments

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

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

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.