Skip to content

Commit 69928f9

Browse files
committed
windows problems again
1 parent bc55596 commit 69928f9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libdd-profiling/src/exporter/file_exporter.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub(crate) fn spawn_dump_server(output_path: PathBuf) -> anyhow::Result<PathBuf>
8080
async fn run_dump_server_windows(
8181
output_path: PathBuf,
8282
pipe_name: String,
83-
mut first_server: tokio::net::windows::named_pipe::NamedPipeServer,
83+
first_server: tokio::net::windows::named_pipe::NamedPipeServer,
8484
) -> anyhow::Result<()> {
8585
use tokio::net::windows::named_pipe::ServerOptions;
8686

@@ -119,7 +119,7 @@ pub(crate) fn spawn_dump_server(output_path: PathBuf) -> anyhow::Result<PathBuf>
119119
let pipe_path = PathBuf::from(&pipe_name);
120120

121121
let (tx, rx) = std::sync::mpsc::channel();
122-
122+
123123
std::thread::spawn(move || {
124124
// Top-level error handler - all errors logged here
125125
let result = (|| -> anyhow::Result<()> {
@@ -129,12 +129,12 @@ pub(crate) fn spawn_dump_server(output_path: PathBuf) -> anyhow::Result<PathBuf>
129129
let first_server = ServerOptions::new()
130130
.first_pipe_instance(true)
131131
.create(&pipe_name)?;
132-
132+
133133
tx.send(Ok(()))?;
134134
run_dump_server_windows(output_path, pipe_name, first_server).await
135135
})
136136
})();
137-
137+
138138
if let Err(e) = result {
139139
eprintln!("[dump-server] Error: {}", e);
140140
let _ = tx.send(Err(e));

libdd-profiling/src/exporter/profile_exporter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl ProfileExporter {
8686
let output_path = libdd_common::decode_uri_path_in_authority(&endpoint.url)
8787
.context("Failed to decode file path from URI")?;
8888
let pipe_path = spawn_dump_server(output_path)?;
89-
builder = builder.windows_named_pipe(pipe_path);
89+
builder = builder.windows_named_pipe(pipe_path.to_string_lossy().to_string());
9090
"http://localhost/v1/input".to_string()
9191
}
9292

@@ -108,7 +108,7 @@ impl ProfileExporter {
108108
Some("windows") => {
109109
use libdd_common::connector::named_pipe::named_pipe_path_from_uri;
110110
let pipe_path = named_pipe_path_from_uri(&endpoint.url)?;
111-
builder = builder.windows_named_pipe(pipe_path);
111+
builder = builder.windows_named_pipe(pipe_path.to_string_lossy().to_string());
112112
format!("http://localhost{}", endpoint.url.path())
113113
}
114114
#[cfg(unix)]

0 commit comments

Comments
 (0)