server: Fix session not closing when a client disconnects#222
Closed
warusadura wants to merge 1 commit into
Closed
server: Fix session not closing when a client disconnects#222warusadura wants to merge 1 commit into
warusadura wants to merge 1 commit into
Conversation
eb60903 to
0eda87e
Compare
0eda87e to
36fe367
Compare
36fe367 to
add132f
Compare
| old_owner, | ||
| session_path | ||
| ), | ||
| Err(_) => tracing::info!("Failed to close session: {}.", session_path), |
Collaborator
There was a problem hiding this comment.
This should not be just info!
Collaborator
Author
There was a problem hiding this comment.
May be error! ?
Collaborator
Author
|
Sorry for the late response, will address review comments this week :) |
Fixes: linux-credentials#218 Signed-off-by: Dhanuka Warusadura <dhanuka@gnome.org>
| #[derive(Debug, Clone)] | ||
| pub struct Session { | ||
| aes_key: Option<Arc<Key>>, | ||
| client_name: String, |
Collaborator
There was a problem hiding this comment.
why you are still converting this to a string? should also be just sender imho
Comment on lines
+494
to
+499
| let Ok((_name, old_owner, new_owner)) = | ||
| message.body().deserialize::<(String, String, String)>() | ||
| else { | ||
| continue; | ||
| }; | ||
|
|
Collaborator
There was a problem hiding this comment.
can this ever fail to deserialize? also add the assertion that new_owner is empty, because you have it in the match rule...
| old_owner, | ||
| session.path() | ||
| ), | ||
| Err(_) => tracing::error!("Failed to close session."), |
Collaborator
There was a problem hiding this comment.
Log the error please.
Collaborator
|
Merged to main after applying my suggested changes. |
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.
Fixes: #218