Skip to content

Commit

Permalink
Prefer sleep instead of sleep_until with Instant::now
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus23 committed Nov 12, 2024
1 parent 67cf8a7 commit 73fd8b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quinn/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn read_after_close() {
.unwrap()
.await
.expect("connect");
tokio::time::sleep_until(Instant::now() + Duration::from_millis(100)).await;
tokio::time::sleep(Duration::from_millis(100)).await;
let mut stream = new_conn.accept_uni().await.expect("incoming streams");
let msg = stream.read_to_end(usize::MAX).await.expect("read_to_end");
assert_eq!(msg, MSG);
Expand Down

0 comments on commit 73fd8b6

Please sign in to comment.