mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-13 19:54:28 +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();
|
unsigned int maxFreeBlockSize = ESP.getMaxFreeBlockSize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (freeHeapSize < 1024 || maxFreeBlockSize < 1024) {
|
if (!vars.actions.restart && (freeHeapSize < 2048 || maxFreeBlockSize < 2048)) {
|
||||||
vars.actions.restart = true;
|
vars.actions.restart = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user