From 227cfce215b9277f6762333b4021946f1ba4f2b4 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 8 Oct 2024 15:46:21 -0500 Subject: [PATCH] Be sure to call callback even on failure --- .../eu/siacs/conversations/http/HttpDownloadConnection.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java index 325a8c1e6d27531df458937b295edd7665777d04..238cc5a0130f267bb9eebd25e4de06470d16f0d2 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpDownloadConnection.java @@ -398,7 +398,6 @@ public class HttpDownloadConnection implements Transferable { decryptIfNeeded(); finish(); updateImageBounds(); - if (cb != null) cb.accept(file); } catch (final SSLHandshakeException e) { changeStatus(STATUS_OFFER); } catch (final Exception e) { @@ -410,6 +409,8 @@ public class HttpDownloadConnection implements Transferable { HttpDownloadConnection.this.mXmppConnectionService.getNotificationService().push(message); } cancel(); + } finally { + if (cb != null) cb.accept(file); } }