[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
1 changed files with 4 additions and 0 deletions

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) {