diff --git a/pallas-network/Cargo.toml b/pallas-network/Cargo.toml index 174c2c8..95598cb 100644 --- a/pallas-network/Cargo.toml +++ b/pallas-network/Cargo.toml @@ -8,10 +8,7 @@ homepage = "https://github.com/txpipe/pallas" documentation = "https://docs.rs/pallas-upstream" license = "Apache-2.0" readme = "README.md" -authors = [ - "Santiago Carmuega ", - "Pi Lanningham ", -] +authors = ["Santiago Carmuega ", "Pi Lanningham "] [dependencies] byteorder = "1.4.3" @@ -23,10 +20,6 @@ thiserror = "1.0.31" tokio = { version = "1", features = ["net", "io-util", "time", "sync", "macros"] } tracing = "0.1.37" -[target.'cfg(windows)'.dependencies] -tokio-named-pipes = "0.1.0" -windows-sys = "0.48.0" - [dev-dependencies] tracing-subscriber = "0.3.16" tokio = { version = "1", features = ["full"] } diff --git a/pallas-network/src/multiplexer.rs b/pallas-network/src/multiplexer.rs index 38eef6c..f848956 100644 --- a/pallas-network/src/multiplexer.rs +++ b/pallas-network/src/multiplexer.rs @@ -103,22 +103,7 @@ impl Bearer { pub async fn connect_named_pipe( pipe_name: impl AsRef, ) -> Result { - // TODO: revisit if busy wait logic is required - let client = loop { - match tokio::net::windows::named_pipe::ClientOptions::new().open(&pipe_name) { - Ok(client) => break client, - Err(e) - if e.raw_os_error() - == Some(windows_sys::Win32::Foundation::ERROR_PIPE_BUSY as i32) => - { - () - } - Err(e) => return Err(e), - } - - tokio::time::sleep(std::time::Duration::from_millis(50)).await; - }; - + let client = tokio::net::windows::named_pipe::ClientOptions::new().open(&pipe_name)?; Ok(Self::NamedPipe(client)) }