fix: resolve speed bottleneck in 10G network (#451)
Co-authored-by: clxcore <clxcore@gmail.com>
This commit is contained in:
parent
c500ce7acc
commit
2cf6d39032
1 changed files with 2 additions and 2 deletions
|
@ -682,7 +682,7 @@ impl Server {
|
||||||
error!("Failed to zip {}, {}", path.display(), e);
|
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(
|
let stream_body = StreamBody::new(
|
||||||
reader_stream
|
reader_stream
|
||||||
.map_ok(Frame::data)
|
.map_ok(Frame::data)
|
||||||
|
@ -899,7 +899,7 @@ impl Server {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let reader_stream = ReaderStream::new(file);
|
let reader_stream = ReaderStream::with_capacity(file, BUF_SIZE);
|
||||||
let stream_body = StreamBody::new(
|
let stream_body = StreamBody::new(
|
||||||
reader_stream
|
reader_stream
|
||||||
.map_ok(Frame::data)
|
.map_ok(Frame::data)
|
||||||
|
|
Loading…
Reference in a new issue