regression, webserver callbacks before reset crashes

any webserver event handlers bound before the webserver new reset would cause memory access issues when triggered.

Should remove all events on reset or make memory safe, not sure if this is the correct way to be reseting the webserver, but there were issues with the ports not releasing etc.
This commit is contained in:
tablatronix
2022-03-11 08:34:08 -06:00
parent 0d61a6b55f
commit 0994c4b3f8
2 changed files with 11 additions and 9 deletions
@@ -24,6 +24,7 @@ WiFiManager wm;
// TEST OPTION FLAGS
bool TEST_CP = false; // always start the configportal, even if ap found
bool TEST_CP = true; // always start the configportal, even if ap found
int TESP_CP_TIMEOUT = 90; // test cp timeout
bool TEST_NET = true; // do a network test after connect, (gets ntp time)
@@ -55,7 +56,7 @@ void saveParamCallback(){
}
void bindServerCallback(){
// wm.server->on("/custom",handleRoute); // this is now crashing esp32 for some reason
wm.server->on("/custom",handleRoute); // this is now crashing esp32 for some reason
// wm.server->on("/info",handleRoute); // you can override wm!
}