expand match
This commit is contained in:
parent
47786912c8
commit
5122ef3fe8
1 changed files with 28 additions and 18 deletions
|
|
@ -52,7 +52,9 @@ pub async fn handle_request(socket: TcpStream, upstream: TcpStream) -> Result<()
|
|||
|
||||
loop {
|
||||
tokio::select! {
|
||||
Some(response) = framed_client_read.next() => {
|
||||
res = framed_client_read.next() => {
|
||||
match res {
|
||||
Some(response) => {
|
||||
match response {
|
||||
Ok(message) => {
|
||||
info!("Send upstream: {message}");
|
||||
|
|
@ -64,7 +66,12 @@ pub async fn handle_request(socket: TcpStream, upstream: TcpStream) -> Result<()
|
|||
}
|
||||
}
|
||||
}
|
||||
Some(response) = farmed_server_read.next() => {
|
||||
None => return Ok(())
|
||||
}
|
||||
}
|
||||
res = farmed_server_read.next() => {
|
||||
match res {
|
||||
Some(response) => {
|
||||
match response {
|
||||
Ok(message) => {
|
||||
info!("Send to client: {message}");
|
||||
|
|
@ -76,6 +83,9 @@ pub async fn handle_request(socket: TcpStream, upstream: TcpStream) -> Result<()
|
|||
}
|
||||
}
|
||||
}
|
||||
None => return Ok(())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue