From 892d913e2cf4835eb1dd35a0608ac84c9174b058 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 22 Apr 2020 18:42:07 +0200 Subject: [PATCH] parsing iq erros also need to finish the connection --- .../conversations/xmpp/jingle/JingleRtpConnection.java | 9 +++------ .../conversations/xmpp/jingle/stanzas/JinglePacket.java | 2 -- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java index 18bdcf1f5..476c463d7 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -680,11 +680,8 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web } else { target = State.TERMINATED_APPLICATION_FAILURE; } - if (transition(target)) { - Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": terminated session with " + id.with); - } else { - Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": not transitioning because already at state=" + this.state); - } + transitionOrThrow(target); + this.finish(); } else if (response.getType() == IqPacket.TYPE.TIMEOUT) { Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": received IQ timeout in RTP session with " + id.with + ". terminating with connectivity error"); if (TERMINATED.contains(this.state)) { @@ -692,7 +689,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web return; } this.webRTCWrapper.close(); - transition(State.TERMINATED_CONNECTIVITY_ERROR); + transitionOrThrow(State.TERMINATED_CONNECTIVITY_ERROR); this.finish(); } } diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java index 99fa3dc60..31ee95bbf 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/JinglePacket.java @@ -16,8 +16,6 @@ import rocks.xmpp.addr.Jid; public class JinglePacket extends IqPacket { - //TODO add support for groups: https://xmpp.org/extensions/xep-0338.html - private JinglePacket() { super(); }