1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 06:12:05 +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; 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
if (!getStatus().equals(Status.cancelled) && getError() == Error.none // 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) { && amountWritten != fileSize) {
setStatus(Status.error); setStatus(Status.error);
this.error = Error.connection; this.error = Error.connection;
@ -313,11 +315,6 @@ public abstract class FileTransfer {
@SuppressWarnings("JavaLangClash") @SuppressWarnings("JavaLangClash")
public enum Error { public enum Error {
/**
* No error.
*/
none("No error"),
/** /**
* The peer did not find any of the provided stream mechanisms * The peer did not find any of the provided stream mechanisms
* acceptable. * acceptable.