about summary refs log tree commit diff
path: root/tvix/castore/src/tonic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/castore/src/tonic.rs')
-rw-r--r--tvix/castore/src/tonic.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/tvix/castore/src/tonic.rs b/tvix/castore/src/tonic.rs
index 4b65d6b028ef..e63e1ad7aab8 100644
--- a/tvix/castore/src/tonic.rs
+++ b/tvix/castore/src/tonic.rs
@@ -1,3 +1,4 @@
+use hyper_util::rt::TokioIo;
 use tokio::net::UnixStream;
 use tonic::transport::{Channel, Endpoint};
 
@@ -25,7 +26,10 @@ pub async fn channel_from_url(url: &url::Url) -> Result<Channel, self::Error> {
 
             let connector = tower::service_fn({
                 let url = url.clone();
-                move |_: tonic::transport::Uri| UnixStream::connect(url.path().to_string().clone())
+                move |_: tonic::transport::Uri| {
+                    let unix = UnixStream::connect(url.path().to_string().clone());
+                    async move { Ok::<_, std::io::Error>(TokioIo::new(unix.await?)) }
+                }
             });
 
             // the URL doesn't matter