mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-19 10:32: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;
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
|
Loading…
Reference in a new issue