Skip to content

Commit

Permalink
chore: improve ipc error message (#5908)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Dec 31, 2023
1 parent 069ca82 commit 8dff31e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/rpc/ipc/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,16 @@ where
let connection_guard = ConnectionGuard::new(self.cfg.max_connections as usize);

let mut connections = FutureDriver::default();
let endpoint_path = self.endpoint.path().to_string();
let incoming = match self.endpoint.incoming() {
Ok(connections) => {
#[cfg(windows)]
let connections = Box::pin(connections);
Incoming::new(connections)
}
Err(err) => {
on_ready.send(Err(err.to_string())).ok();
let msg = format!("failed to listen on ipc endpoint `{endpoint_path}`: {err}");
on_ready.send(Err(msg)).ok();
return Err(err)
}
};
Expand Down

0 comments on commit 8dff31e

Please sign in to comment.