Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't stop the broker if unable to restore persisted state. (#6063)
When broker is forcefully terminated, it is possible that the broker state file can be corrupted. Right now the corrupted state file prevents broker from restarting. This PR changes the behavior: now we log the error and ignore the corrupted state file. Even though the loss of up-to-date state happens in any circumstance with forced shutdown, the downside of this approach is that loss of state can happen unnoticeable. But it seems like it is preferable for a broker to continue to operate, rather that a user to go and cleanup state file(s). This functionality is not covered by unit tests. The manual testing has been performed. This fixes #6004 ## Azure IoT Edge PR checklist:
- Loading branch information