src/api2/admin/datastore/backup.rs: add speedtest api, improve upload speed
We need to disable tcp Nagle algorythm (set_nodelay), and use larger window size for http2
This commit is contained in:
@ -29,9 +29,9 @@ impl Future for PipeToSendStream {
|
||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||
loop {
|
||||
if self.data != None {
|
||||
// we don't have the next chunk of data yet, so just reserve 1 byte to make
|
||||
// sure there's some capacity available. h2 will handle the capacity management
|
||||
// for the actual body chunk.
|
||||
// just reserve 1 byte to make sure there's some
|
||||
// capacity available. h2 will handle the capacity
|
||||
// management for the actual body chunk.
|
||||
self.body_tx.reserve_capacity(1);
|
||||
|
||||
if self.body_tx.capacity() == 0 {
|
||||
|
Reference in New Issue
Block a user