examples: adjust buffering in examples (#3328)

This commit is contained in:
AJ Frantz
2020-12-27 10:43:02 +01:00
committed by GitHub
parent 4d7b73f5b3
commit c4929264bc
4 changed files with 5 additions and 6 deletions
+1 -2
View File
@@ -26,7 +26,6 @@ use tokio::io;
use tokio::io::AsyncWriteExt;
use tokio::net::{TcpListener, TcpStream};
use futures::future::try_join;
use futures::FutureExt;
use std::env;
use std::error::Error;
@@ -74,7 +73,7 @@ async fn transfer(mut inbound: TcpStream, proxy_addr: String) -> Result<(), Box<
wi.shutdown().await
};
try_join(client_to_server, server_to_client).await?;
tokio::try_join!(client_to_server, server_to_client)?;
Ok(())
}