|
|
@ -222,10 +222,13 @@ impl Transport {
|
|
|
|
loop {
|
|
|
|
loop {
|
|
|
|
match Self::recv_server_message(&mut server_stdout, &mut recv_buffer).await {
|
|
|
|
match Self::recv_server_message(&mut server_stdout, &mut recv_buffer).await {
|
|
|
|
Ok(msg) => {
|
|
|
|
Ok(msg) => {
|
|
|
|
transport
|
|
|
|
match transport.process_server_message(&client_tx, msg).await {
|
|
|
|
.process_server_message(&client_tx, msg)
|
|
|
|
Ok(_) => {}
|
|
|
|
.await
|
|
|
|
Err(err) => {
|
|
|
|
.unwrap();
|
|
|
|
error!("err: <- {:?}", err);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Err(err) => {
|
|
|
|
Err(err) => {
|
|
|
|
error!("err: <- {:?}", err);
|
|
|
|
error!("err: <- {:?}", err);
|
|
|
@ -254,10 +257,15 @@ impl Transport {
|
|
|
|
mut client_rx: UnboundedReceiver<Payload>,
|
|
|
|
mut client_rx: UnboundedReceiver<Payload>,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
while let Some(msg) = client_rx.recv().await {
|
|
|
|
while let Some(msg) = client_rx.recv().await {
|
|
|
|
transport
|
|
|
|
match transport
|
|
|
|
.send_payload_to_server(&mut server_stdin, msg)
|
|
|
|
.send_payload_to_server(&mut server_stdin, msg)
|
|
|
|
.await
|
|
|
|
.await
|
|
|
|
.unwrap()
|
|
|
|
{
|
|
|
|
|
|
|
|
Ok(_) => {}
|
|
|
|
|
|
|
|
Err(err) => {
|
|
|
|
|
|
|
|
error!("err: <- {:?}", err);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|