terminate with application failure when failing to apply ICE restart
This is fairly unlikely to happen in practice
This commit is contained in:
parent
3f402b132b
commit
0a3947b8e3
|
@ -319,9 +319,12 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
||||||
respondWithTieBreak(jinglePacket);
|
respondWithTieBreak(jinglePacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (final Exception exception) {
|
||||||
Log.d(Config.LOGTAG, "failure to apply ICE restart. sending error", e);
|
respondOk(jinglePacket);
|
||||||
//TODO respond OK and then terminate session
|
final Throwable rootCause = Throwables.getRootCause(exception);
|
||||||
|
Log.d(Config.LOGTAG, "failure to apply ICE restart", rootCause);
|
||||||
|
webRTCWrapper.close();
|
||||||
|
sendSessionTerminate(Reason.ofThrowable(rootCause), rootCause.getMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -574,7 +577,7 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable to set remote description after receiving session-accept", Throwables.getRootCause(e));
|
Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": unable to set remote description after receiving session-accept", Throwables.getRootCause(e));
|
||||||
webRTCWrapper.close();
|
webRTCWrapper.close();
|
||||||
sendSessionTerminate(Reason.FAILED_APPLICATION);
|
sendSessionTerminate(Reason.FAILED_APPLICATION, Throwables.getRootCause(e).getMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
processCandidates(contentMap.contents.entrySet());
|
processCandidates(contentMap.contents.entrySet());
|
||||||
|
@ -624,7 +627,6 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
||||||
org.webrtc.SessionDescription webRTCSessionDescription = this.webRTCWrapper.setLocalDescription().get();
|
org.webrtc.SessionDescription webRTCSessionDescription = this.webRTCWrapper.setLocalDescription().get();
|
||||||
prepareSessionAccept(webRTCSessionDescription);
|
prepareSessionAccept(webRTCSessionDescription);
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
//TODO sending the error text is worthwhile as well. Especially for FailureToSet exceptions
|
|
||||||
failureToAcceptSession(e);
|
failureToAcceptSession(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -633,9 +635,10 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
|
||||||
if (isTerminated()) {
|
if (isTerminated()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Log.d(Config.LOGTAG, "unable to send session accept", Throwables.getRootCause(throwable));
|
final Throwable rootCause = Throwables.getRootCause(throwable);
|
||||||
|
Log.d(Config.LOGTAG, "unable to send session accept", rootCause);
|
||||||
webRTCWrapper.close();
|
webRTCWrapper.close();
|
||||||
sendSessionTerminate(Reason.ofThrowable(throwable));
|
sendSessionTerminate(Reason.ofThrowable(rootCause), rootCause.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addIceCandidatesFromBlackLog() {
|
private void addIceCandidatesFromBlackLog() {
|
||||||
|
|
Loading…
Reference in New Issue