diff --git a/proxy/src/bin/pglb.rs b/proxy/src/bin/pglb.rs index d671553ec0..0cd2c727b9 100644 --- a/proxy/src/bin/pglb.rs +++ b/proxy/src/bin/pglb.rs @@ -582,7 +582,28 @@ struct ComputePassthrough { impl PglbConn { async fn handle_compute_passthrough(self) -> Result> { - todo!() + let ComputePassthrough { + mut client_stream, + mut compute_stream, + } = self.state; + + loop { + select! { + msg = client_stream.next() => { + let Some(msg) = msg else { + bail!("compute disconnected"); + }; + compute_stream.send(msg?).await?; + } + + msg = compute_stream.next() => { + let Some(msg) = msg else { + bail!("compute disconnected"); + }; + client_stream.send(msg?).await?; + } + } + } } }