wip
This commit is contained in:
@@ -19,8 +19,8 @@ async fn stream_file_bytes(
|
||||
let remote_addr = maybe_addr!(tx.connection().remote_addr());
|
||||
let game_file = base_dir.join(relative_path);
|
||||
log::debug!(
|
||||
"{remote_addr} streaming file bytes for peer: {:?}, offset: {offset}, length: {length:?}",
|
||||
game_file
|
||||
"{remote_addr} streaming file bytes for peer: {}, offset: {offset}, length: {length:?}",
|
||||
game_file.display()
|
||||
);
|
||||
|
||||
let mut file = tokio::fs::File::open(&game_file).await?;
|
||||
@@ -58,8 +58,8 @@ async fn stream_file_bytes(
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
let mb_per_s = (diff_bytes as f64) / (elapsed.as_secs_f64() * 1_000_000.0);
|
||||
log::debug!(
|
||||
"{remote_addr} sending file data: {:?}, MB/s: {mb_per_s:.2}",
|
||||
game_file
|
||||
"{remote_addr} sending file data: {}, MB/s: {mb_per_s:.2}",
|
||||
game_file.display()
|
||||
);
|
||||
last_total_bytes = total_bytes;
|
||||
timestamp = Instant::now();
|
||||
@@ -68,8 +68,8 @@ async fn stream_file_bytes(
|
||||
}
|
||||
|
||||
log::debug!(
|
||||
"{remote_addr} finished streaming file bytes: {:?}, total_bytes: {total_bytes}",
|
||||
game_file
|
||||
"{remote_addr} finished streaming file bytes: {}, total_bytes: {total_bytes}",
|
||||
game_file.display()
|
||||
);
|
||||
|
||||
tx.close().await?;
|
||||
|
||||
Reference in New Issue
Block a user