Repository navigation
Conversation
The GTK view model unwrapped every send to the request's event loop. If the caller disconnected right after CreateSession, the loop had already ended when the UI sent Initiated, and credentialsd-ui aborted with SendError. Log a warning instead; the UI closes with the request anyway.
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.
Follow-up to the crash mentioned in #262.
If the caller disconnects right after
CreateSession(e.g. a one-shotbusctl call), the request's event loop ends before the GTK view model sendsViewEvent::Initiated, and credentialsd-ui aborts atgtk/mod.rs:121withcalled Result::unwrap() on an Err value: SendError(..).The three sends from the GTK view model to the event loop (
Initiated, credential selection, andsend_event) now log a warning instead of unwrapping. As discussed, the receiving loop has already ended, so there is nothing else to do; the UI closes with the request.The
tx_updateunwraps in the other direction (event loop → GTK) are left for a separate change, since #261 touches that file heavily.Testing
CreateSessionwithbusctl --user call, which disconnects immediately:cargo build --locked,cargo fmt --check.