Apply local settings timeouts, global read_all_settings timeout[CPP-693] #487
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.
Uprevs libsettings-rs to 0.6.8.
Applies a 1 second timeout on all read and write settings via with_timeout helpers in libsettings-rs "0.6.8". This can be validated by connecting to the piksi-relay. Previously, it would take the full 15 seconds for a single setting read to timeout. Additionally, if you attempted disconnecting in this first 15s it would lock up the app and not allow one to connect to another device.
Reworks the global timeout on read_all_settings by decoupling the global timeout from the individual settings read timeouts. Now a separate thread runs that will exit on a the watched ConnectionState (switching to either disconnected/connecting/disconnecting) or the global 15s timeout expiring. This can be validated by disconnecting from a serial device (while loading settings), previously this would lock up the app.
Minor additional check to prevent the app from trying to reconnect if the connection dialog is open.
There may be some additional corner cases not handled here we will need to watch out for but this looks very promising as we approach our release.