X-Git-Url: https://piware.de/gitweb/?p=learn-rust.git;a=blobdiff_plain;f=tokio-tutorial-jbarszczewski%2Fsrc%2Fmain.rs;fp=tokio-tutorial-jbarszczewski%2Fsrc%2Fmain.rs;h=e1c7800d242f5b87543562288221967a491d5208;hp=5d49be551efef52c54ac9d9e2a12fc52029e249e;hb=fa249a206c8c9a806195ce98471e0433b20b49e7;hpb=3999f76777dd4654553d944fb9e309150df8582f diff --git a/tokio-tutorial-jbarszczewski/src/main.rs b/tokio-tutorial-jbarszczewski/src/main.rs index 5d49be5..e1c7800 100644 --- a/tokio-tutorial-jbarszczewski/src/main.rs +++ b/tokio-tutorial-jbarszczewski/src/main.rs @@ -7,7 +7,7 @@ async fn main() { loop { let (stream, _) = listener.accept().await.unwrap(); - handle_connection(stream).await; + tokio::spawn(async move { handle_connection(stream).await }); } }