From 59cf4497999cd621806cfcbdf6cb28b3f8ada8ba Mon Sep 17 00:00:00 2001 From: Guus der Kinderen Date: Mon, 9 Nov 2020 16:23:21 +0100 Subject: [PATCH] Provide more detailed code comment. --- .../org/jivesoftware/smackx/filetransfer/FileTransfer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java index c09e8ede0..cac3147cf 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java @@ -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);