Provide more detailed code comment.

This commit is contained in:
Guus der Kinderen 2020-11-09 16:23:21 +01:00 committed by Florian Schmaus
parent 0ff8040895
commit 59cf449799
1 changed files with 3 additions and 1 deletions

View File

@ -214,7 +214,9 @@ public abstract class FileTransfer {
amountWritten += count;
}
// the connection was likely terminated abruptly if these are not equal
// When the amount of data written does not equal the expected amount, and
// the transfer was not explicitly cancelled, register an error (unless another
// error has already been logged).
if (!getStatus().equals(Status.cancelled) && getError() == null
&& amountWritten != fileSize) {
setStatus(Status.error);