Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
add timeout before closing the http server
Browse files Browse the repository at this point in the history
  • Loading branch information
musitdev committed Jan 17, 2024
1 parent df551be commit 1e48565
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/cli/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ pub async fn serve_file(
}
if served_files.is_empty() {
//end of the download
//wait that the http download buffer flush.
tokio::time::sleep(tokio::time::Duration::from_millis(250)).await;
break;
}
}
_ = download_started_interval.tick() => {
if !download_started {
log::error!("Node download didn't started in time. Local host can be unreachable from node.");
//wait that the http download buffer flush.
tokio::time::sleep(tokio::time::Duration::from_millis(250)).await;
break;
}
}
Expand Down

0 comments on commit 1e48565

Please sign in to comment.