mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +00:00
Merge branch 'cloneable/pglb-compute-passthrough' into pglb
This commit is contained in:
@@ -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?;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user