Skip to content

Commit

Permalink
Perform sleep correct
Browse files Browse the repository at this point in the history
  • Loading branch information
umgefahren committed Dec 30, 2023
1 parent 4d96c33 commit 8a135ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion protocols/autonat/src/v2/server/handler/dial_back.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ async fn perform_dial_back(
..
}: DialBackCommand,
) -> io::Result<()> {
futures_time::task::sleep(futures_time::time::Duration::from_millis(100)).await;
let res = dial_back(stream, nonce)
.await
.map_err(|_| DialBackRes::DialBackErr)
.map(|_| ());
futures_time::task::sleep(futures_time::time::Duration::from_millis(100)).await;
back_channel
.send(res)
.map_err(|_| io::Error::new(io::ErrorKind::Other, "send error"))?;
Expand Down

0 comments on commit 8a135ea

Please sign in to comment.