mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 10:44:29 +05:00
fix: automatic reboot if memory is too low
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user