mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
systematically fetch heap mem settings, before allocating buffers so console and web show same results
This commit is contained in:
@@ -100,6 +100,9 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject & input) {
|
||||
}
|
||||
}
|
||||
|
||||
// capture current heap memory before allocating the large return buffer
|
||||
emsesp::EMSESP::system_.refreshHeapMem();
|
||||
|
||||
// output json buffer
|
||||
size_t buffer = EMSESP_JSON_SIZE_XXXLARGE;
|
||||
auto * response = new PrettyAsyncJsonResponse(false, buffer);
|
||||
|
||||
Reference in New Issue
Block a user