Be sure to call callback even on failure

(cherry picked from commit 227cfce215b9277f6762333b4021946f1ba4f2b4)
This commit is contained in:
Stephen Paul Weber 2024-10-08 15:46:21 -05:00 committed by Arne
parent 09b48e9416
commit bda283fa85

View file

@ -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);
}
}