mirror of
https://github.com/HASwitchPlate/HASPone.git
synced 2025-07-24 11:46:33 +00:00
Fix race condition in JSON config save
This commit is contained in:
parent
509e6a897a
commit
3ea99814b4
@ -2326,7 +2326,7 @@ void configSave()
|
||||
{ // Save the custom parameters to config.json
|
||||
nextionSetAttr("p[0].b[1].txt", "\"Saving\\rconfig\"");
|
||||
debugPrintln(F("SPIFFS: Saving config"));
|
||||
DynamicJsonDocument jsonConfigValues(1536);
|
||||
DynamicJsonDocument jsonConfigValues(2048);
|
||||
|
||||
jsonConfigValues["mqttServer"] = mqttServer;
|
||||
jsonConfigValues["mqttPort"] = mqttPort;
|
||||
@ -2376,6 +2376,7 @@ void configSave()
|
||||
else
|
||||
{
|
||||
serializeJson(jsonConfigValues, configFile);
|
||||
yield();
|
||||
configFile.close();
|
||||
}
|
||||
shouldSaveConfig = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user