parsing iq erros also need to finish the connection

This commit is contained in:
Daniel Gultsch 2020-04-22 18:42:07 +02:00
parent 9fa9ca9cbc
commit 892d913e2c
2 changed files with 3 additions and 8 deletions

View File

@ -680,11 +680,8 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
} else { } else {
target = State.TERMINATED_APPLICATION_FAILURE; target = State.TERMINATED_APPLICATION_FAILURE;
} }
if (transition(target)) { transitionOrThrow(target);
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": terminated session with " + id.with); this.finish();
} else {
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": not transitioning because already at state=" + this.state);
}
} else if (response.getType() == IqPacket.TYPE.TIMEOUT) { } 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"); 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)) { if (TERMINATED.contains(this.state)) {
@ -692,7 +689,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
return; return;
} }
this.webRTCWrapper.close(); this.webRTCWrapper.close();
transition(State.TERMINATED_CONNECTIVITY_ERROR); transitionOrThrow(State.TERMINATED_CONNECTIVITY_ERROR);
this.finish(); this.finish();
} }
} }

View File

@ -16,8 +16,6 @@ import rocks.xmpp.addr.Jid;
public class JinglePacket extends IqPacket { public class JinglePacket extends IqPacket {
//TODO add support for groups: https://xmpp.org/extensions/xep-0338.html
private JinglePacket() { private JinglePacket() {
super(); super();
} }