Break on recv/send errors

This commit is contained in:
ChristianVisintin 2020-12-10 11:51:49 +01:00
parent 66f17c93c2
commit 843c5ab6d0
2 changed files with 8 additions and 1 deletions

View file

@ -21,8 +21,10 @@ Work in progress
- Removed `CTRL`; just use keys now.
- bugfix:
- prevent panic in set_progress, for progress values `> 100.0 or < 0.0`
- Fixed FTP get, which didn't finalize the reader
- dependencies:
- updated `textwrap` to `0.13.0`
- updated `ftp4` to `4.0.1`
## 0.1.0

View file

@ -171,7 +171,9 @@ impl FileTransferActivity {
while buf_start < bytes_read {
// Write bytes
match rhnd.write(&buffer[buf_start..bytes_read]) {
Ok(bytes) => buf_start += bytes,
Ok(bytes) => {
buf_start += bytes;
}
Err(err) => {
self.log(
LogLevel::Error,
@ -204,6 +206,7 @@ impl FileTransferActivity {
Color::Red,
format!("Could not read local file: {}", err),
));
break
}
}
// Increase progress
@ -441,6 +444,7 @@ impl FileTransferActivity {
err
),
));
break
}
}
}
@ -456,6 +460,7 @@ impl FileTransferActivity {
Color::Red,
format!("Could not read remote file: {}", err),
));
break
}
}
// Set progress