Skip to content

Commit

Permalink
Clarify the purpose of the task
Browse files Browse the repository at this point in the history
Co-authored-by: Eirik A <sszynrae@gmail.com>
  • Loading branch information
kazk and clux authored Jan 30, 2022
1 parent 2a21db8 commit 20a91e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/pod_portforward_hyper_http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ async fn main() -> anyhow::Result<()> {
let ports = pf.ports();
let port = ports[0].stream().unwrap();

let (mut sender, connection) = client::conn::handshake(port).await?;

// spawn a task to poll the connection and drive the HTTP state
// let hyper drive the HTTP state in our DuplexStream via a task
let (mut sender, connection) = hyper::client::conn::handshake(port).await?;
tokio::spawn(async move {
if let Err(e) = connection.await {
eprintln!("Error in connection: {}", e);
Expand Down

0 comments on commit 20a91e5

Please sign in to comment.