File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
libdd-profiling/src/exporter Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ pub(crate) fn spawn_dump_server(output_path: PathBuf) -> anyhow::Result<PathBuf>
8080async 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) ) ;
Original file line number Diff line number Diff 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) ]
You can’t perform that action at this time.
0 commit comments