Skip to content

Commit

Permalink
fix: resolve speed bottleneck in 10G network (#451)
Browse files Browse the repository at this point in the history
Co-authored-by: clxcore <[email protected]>
  • Loading branch information
clxcore and clxcore authored Sep 7, 2024
1 parent c500ce7 commit 2cf6d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ impl Server {
error!("Failed to zip {}, {}", path.display(), e);
}
});
let reader_stream = ReaderStream::new(reader);
let reader_stream = ReaderStream::with_capacity(reader, BUF_SIZE);
let stream_body = StreamBody::new(
reader_stream
.map_ok(Frame::data)
Expand Down Expand Up @@ -899,7 +899,7 @@ impl Server {
return Ok(());
}

let reader_stream = ReaderStream::new(file);
let reader_stream = ReaderStream::with_capacity(file, BUF_SIZE);
let stream_body = StreamBody::new(
reader_stream
.map_ok(Frame::data)
Expand Down

0 comments on commit 2cf6d39

Please sign in to comment.