mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-04 09:09:41 +00:00
fix syntax problem for task::sleep
This commit is contained in:
parent
1ababac97f
commit
b258215952
1 changed files with 1 additions and 1 deletions
|
@ -90,7 +90,7 @@ the connection to the protocol handler, like this:
|
|||
# let mut incoming = listener.incoming();
|
||||
while let Some(stream) = incoming.next().await {
|
||||
task::spawn(async {
|
||||
task:sleep(Duration::from_secs(10)).await; // 1
|
||||
task::sleep(Duration::from_secs(10)).await; // 1
|
||||
connection_loop(stream).await;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue