Merge branch 'cloneable/pglb-compute-passthrough' into pglb

This commit is contained in:
Folke Behrens
2024-09-13 10:05:06 +01:00

View File

@@ -582,7 +582,28 @@ struct ComputePassthrough {
impl PglbConn<ComputePassthrough> {
async fn handle_compute_passthrough(self) -> Result<PglbConn<End>> {
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?;
}
}
}
}
}