simple-http: Naïve unlimited threads
[learn-rust.git] / simple-http / src / main.rs
index d2d0f8801302d343ebd36dd7a1875049feda4292..0993075332c1c2335f135f45f0b1c875d7b5a783 100644 (file)
@@ -64,6 +64,6 @@ fn main() {
 
     for stream in listener.incoming() {
         let stream = stream.unwrap();
-        handle_connection(stream);
+        thread::spawn(|| handle_connection(stream));
     }
 }