fix: automatic reboot if memory is too low

This commit is contained in:
Yurii
2024-01-13 12:58:44 +03:00
parent b7c090465b
commit a9db175dba

View File

@@ -173,7 +173,7 @@ protected:
unsigned int maxFreeBlockSize = ESP.getMaxFreeBlockSize();
#endif
if (freeHeapSize < 1024 || maxFreeBlockSize < 1024) {
if (!vars.actions.restart && (freeHeapSize < 2048 || maxFreeBlockSize < 2048)) {
vars.actions.restart = true;
return;
}