Fix behavior when switching nodes #4036
Merged
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.
Works together with the fixes in Monero PR monero-project/monero#8585.
The most significant fix in this PR is that it prevents the GUI from getting stuck in an infinite "Connecting" loop when connecting to a non-existent (or sometimes offline) daemon.
It also fixes some jank (and some of the incorrect underlying behavior) when switching nodes. The underlying async behavior still isn't perfect, but it's a move in a better direction. See the demos below.
GUI v0.18.1.1 + this PR + Monero PR 8585
Not shown: connecting to
1.2.3.4:18081
takes 20 seconds to time out and display "Disconnected"GUI v0.18.1.1 + Monero PR 8585 (this PR is excluded)
Not shown: connecting to
1.2.3.4:18081
gets stuck infinite "Connecting"