From 2779187d8cfee7e79a7157e37682229b92753bc8 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 14 Mar 2021 17:54:03 +0100 Subject: [PATCH] [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. --- .../org/jivesoftware/smackx/filetransfer/FileTransfer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java index cac3147cf..8c5dc63d3 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransfer.java @@ -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) {