1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-19 02:22:05 +01:00

[filetransfer] Set the status to error in setException()

FileTransfer would previously not change the status, even though an
exception has been set, leading users to believe that the transfer is
still ongoing, when it is not.
This commit is contained in:
Florian Schmaus 2021-03-14 17:54:03 +01:00
parent c564c89c40
commit 2779187d8c

View file

@ -183,6 +183,10 @@ public abstract class FileTransfer {
protected void setException(Exception exception) {
this.exception = exception;
Status currentStatus = getStatus();
if (currentStatus != Status.error) {
updateStatus(currentStatus, Status.error);
}
}
protected void setStatus(Status status) {