do not terminate jingle ft session twice (after iq timeout)

This commit is contained in:
Daniel Gultsch 2024-03-03 20:14:27 +01:00
parent 00f52226d8
commit b9a19dc6c7
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2

View file

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