Repository navigation
Conversation
writeConfig builds the whole config file from cfgCache, which was only updated after the write finished, so a second write started before the first resolved dropped the first one's key on disk while the UI still showed it on. Chain the writes so each starts from the result of the previous one. Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
5 of 6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WebUI #3.
writeConfig(vendoredvdlu.js) builds the wholeconfigfile fromcfgCache, andcfgCachewas only updated after the exec resolved. Two quick switch taps (auto_on_webui_open=1, thenauto_on_reboot=1) produced a file with only one of the keys, so a toggle the UI showed as on was off on disk.writeConfignow queues each write on one promise chain; each write builds its body from thecfgCachethe previous write left. A failed write does not block later ones, and the caller still gets its own promise (so the existing toast/revert handlers behave the same).vdlu.jsis vendored; the same change may be wanted where it comes from.Testing
node --checkon vdlu.js.writeConfigwith a stubex(first write 300 ms, second 10 ms): with this change the file ends asauto_on_webui_open=1+auto_on_reboot=1; on main it ends with one key only.shoot.py's screens).