pull/146/head
Chip Senkbeil 2 years ago
parent e19d24036d
commit 0555bacd1f
No known key found for this signature in database
GPG Key ID: 35EF1F8EC72A4131

@ -24,7 +24,7 @@ impl WindowsPipeConnector {
impl<T: Into<OsString>> From<T> for WindowsPipeConnector {
fn from(addr: T) -> Self {
Self::new(path)
Self::new(addr)
}
}
@ -33,12 +33,12 @@ impl Connector for WindowsPipeConnector {
type Transport = WindowsPipeTransport;
async fn connect(self) -> io::Result<Self::Transport> {
WindowsPipeTransport::connect(if local {
WindowsPipeTransport::connect(if self.local {
let mut full_addr = OsString::from(r"\\.\pipe\");
full_addr.push(addr.as_ref());
full_addr.push(self.addr.as_ref());
WindowsPipeTransport::connect(full_addr)
} else {
WindowsPipeTransport::connect(addr.as_ref())
WindowsPipeTransport::connect(self.addr.as_ref())
}).await
}
}

@ -101,9 +101,9 @@ mod tests {
.await
.expect("Failed to start Windows pipe server");
let mut client: Client<String, String> = Client::windows_pipe()
let mut client: Client<String, String> = Client::windows_pipe(server.addr())
.auth_handler(DummyAuthHandler)
.connect(server.addr())
.connect()
.await
.expect("Client failed to connect");

Loading…
Cancel
Save