From 15a3c163eb74c47915ccba1047651f15053388e2 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 19 Jan 2024 10:40:32 +0100 Subject: [PATCH] respond OK to JFT session terminate --- .../xmpp/jingle/JingleFileTransferConnection.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 983ce433f..e7847cdd2 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleFileTransferConnection.java @@ -556,6 +556,7 @@ public class JingleFileTransferConnection extends AbstractJingleConnection } private void receiveSessionTerminate(final JinglePacket jinglePacket) { + respondOk(jinglePacket); final JinglePacket.ReasonWrapper wrapper = jinglePacket.getReason(); final State previous = this.state; Log.d( @@ -745,16 +746,17 @@ public class JingleFileTransferConnection extends AbstractJingleConnection private void receiveTransportReplace( final JinglePacket jinglePacket, final GenericTransportInfo transportInfo) { respondOk(jinglePacket); - final Transport transport; + // TODO kill current transport + final Transport nextTransport; try { - transport = setupTransport(transportInfo); + nextTransport = setupTransport(transportInfo); } catch (final RuntimeException e) { sendSessionTerminate(Reason.of(e), e.getMessage()); return; } - this.transport = transport; + this.transport = nextTransport; this.transport.setTransportCallback(this); - final var transportInfoFuture = transport.asTransportInfo(); + final var transportInfoFuture = nextTransport.asTransportInfo(); Futures.addCallback( transportInfoFuture, new FutureCallback<>() {