Skip to content

Keep companion preferences dirty when saving fails - #3716

Open
Amoulier wants to merge 1 commit into
meshcore-dev:devfrom
Amoulier:fix/companion-prefs-save-failure
Open

Amoulier wants to merge 1 commit into
meshcore-dev:devfrom
Amoulier:fix/companion-prefs-save-failure

Conversation

@Amoulier

Copy link
Copy Markdown

When the datastore rejects a preferences write, MyMesh::savePrefs() currently clears the dirty flags anyway. A failed write can therefore leave the in-memory settings marked as saved although they were not persisted. Only clear dirty state after DataStore::savePrefs() reports success.

The method's public signature and successful-save behavior stay unchanged. This does not add a new write format, automatic retry policy or shutdown behavior.

Validation:

  • A focused host regression compiled the actual savePrefs() method with a failing datastore, checked that dirty state remained set, then allowed a subsequent save and checked that the state cleared.
  • pio run -e muzi_base_uno_superIO_companion_radio_ble: passed.
  • git diff --check: passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant