1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-22 12:37:58 +01:00

Merge branch '4.4'

This commit is contained in:
Florian Schmaus 2020-11-09 21:23:25 +01:00
commit 3f3a7cb540

View file

@ -214,8 +214,10 @@ public abstract class FileTransfer {
amountWritten += count;
}
// the connection was likely terminated abruptly if these are not equal
if (!getStatus().equals(Status.cancelled) && getError() == Error.none
// 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);
this.error = Error.connection;
@ -313,11 +315,6 @@ public abstract class FileTransfer {
@SuppressWarnings("JavaLangClash")
public enum Error {
/**
* No error.
*/
none("No error"),
/**
* The peer did not find any of the provided stream mechanisms
* acceptable.