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:
commit
3f3a7cb540
1 changed files with 4 additions and 7 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue