fix stack overflow in lwip task

This commit is contained in:
MichaelDvP
2023-03-14 15:04:48 +01:00
parent 2c572f8099
commit d3615d2961

View File

@@ -529,7 +529,8 @@ void System::loop() {
// send MQTT info topic appended with the version information as JSON, as a retained flag
void System::send_info_mqtt(const char * event_str, bool send_ntp) {
StaticJsonDocument<EMSESP_JSON_SIZE_MEDIUM> doc;
// use dynamic json becaues it is called from NTP-callback from lwip task with small stack
DynamicJsonDocument doc = DynamicJsonDocument(EMSESP_JSON_SIZE_MEDIUM);
doc["event"] = event_str;
doc["version"] = EMSESP_APP_VERSION;