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 {
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();
}
}

View file

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