From 807d4018f3695c7261cd7de77bc71c57a92c55c0 Mon Sep 17 00:00:00 2001 From: Wenxuan Date: Sun, 19 May 2019 00:30:05 +0800 Subject: [PATCH] Fix blocking in guessing example. If we await inner the while loop the server will be blocked and can't serve more than one client. --- examples/guessing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/guessing.rs b/examples/guessing.rs index b8b6eff6..a074fa9d 100644 --- a/examples/guessing.rs +++ b/examples/guessing.rs @@ -63,7 +63,7 @@ async fn main() -> Result<(), failure::Error> { let mut incoming = listener.incoming(); while let Some(stream) = incoming.next().await { - runtime::spawn(play(stream?)).await?; + runtime::spawn(play(stream?)); } Ok(()) }