Improved sftp and I/O in general: set buffer size to 65536

This commit is contained in:
ChristianVisintin
2020-12-06 20:59:45 +01:00
parent 0ed6bd30f1
commit 5e0b130123
2 changed files with 60 additions and 42 deletions

View File

@@ -522,7 +522,7 @@ impl FileTransfer for SftpFileTransfer {
mode,
OpenType::File,
) {
Ok(file) => Ok(Box::new(BufWriter::with_capacity(8192, file))),
Ok(file) => Ok(Box::new(BufWriter::with_capacity(65536, file))),
Err(err) => Err(FileTransferError::new_ex(
FileTransferErrorType::FileCreateDenied,
format!("{}", err),