X-Git-Url: https://piware.de/gitweb/?p=learn-rust.git;a=blobdiff_plain;f=simple-http%2Fsrc%2Fmain.rs;h=0993075332c1c2335f135f45f0b1c875d7b5a783;hp=d2d0f8801302d343ebd36dd7a1875049feda4292;hb=30342e681c6db184ebca5aa2c30ee8bb7f60470d;hpb=4ccd093f060dfe589c0ec86e9047e350f50550f1;ds=sidebyside diff --git a/simple-http/src/main.rs b/simple-http/src/main.rs index d2d0f88..0993075 100644 --- a/simple-http/src/main.rs +++ b/simple-http/src/main.rs @@ -64,6 +64,6 @@ fn main() { for stream in listener.incoming() { let stream = stream.unwrap(); - handle_connection(stream); + thread::spawn(|| handle_connection(stream)); } }