From b9a19dc6c7b20abb006c35d34d1673829d8df25a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 3 Mar 2024 20:14:27 +0100 Subject: [PATCH] do not terminate jingle ft session twice (after iq timeout) --- .../xmpp/jingle/JingleFileTransferConnection.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java index 632a8f034..845f91ecc 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java @@ -843,6 +843,8 @@ public class JingleFileTransferConnection extends AbstractJingleConnection if (transport == null) { return; } + // TODO consider setting transport callback to null. requires transport to handle null callback + //transport.setTransportCallback(null); transport.terminate(); this.transport = null; } @@ -980,7 +982,10 @@ public class JingleFileTransferConnection extends AbstractJingleConnection public void onTransportSetupFailed() { final var transport = this.transport; if (transport == null) { - // this really is not supposed to happen + // this can happen on IQ timeouts + if (isTerminated()) { + return; + } sendSessionTerminate(Reason.FAILED_APPLICATION, null); return; }