1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 03:03:43 +00:00

Improve desktop IPC logging (#11864)

* Improve desktop IPC logging

* Log error

* Force file to only log info, like the desktop app does

* use ?
This commit is contained in:
Daniel García
2024-11-14 17:45:19 +01:00
committed by GitHub
parent ef127fd26e
commit d0f24dc41f
5 changed files with 38 additions and 6 deletions

View File

@@ -1,4 +1,8 @@
use std::{error::Error, path::Path, vec};
use std::{
error::Error,
path::{Path, PathBuf},
vec,
};
use futures::TryFutureExt;
@@ -29,6 +33,7 @@ pub enum MessageType {
}
pub struct Server {
pub path: PathBuf,
cancel_token: CancellationToken,
server_to_clients_send: broadcast::Sender<String>,
}
@@ -66,6 +71,7 @@ impl Server {
// Create the server and start listening for incoming connections
// in a separate task to avoid blocking the current task
let server = Server {
path: path.to_owned(),
cancel_token: cancel_token.clone(),
server_to_clients_send,
};