From 0898ea77ffcd90b6d37e71e26e2dcdc6a850c660 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Tue, 31 Oct 2023 13:16:17 +0100 Subject: [PATCH] jingle: do not send session-terminate after failed regneg when session already was --- .../conversations/xmpp/jingle/JingleRtpConnection.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 e080b2a35..b8a1483b0 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -2007,7 +2007,6 @@ public class JingleRtpConnection extends AbstractJingleConnection final JinglePacket jinglePacket = new JinglePacket(JinglePacket.Action.SESSION_TERMINATE, id.sessionId); jinglePacket.setReason(reason, text); - Log.d(Config.LOGTAG, jinglePacket.toString()); send(jinglePacket); finish(); } @@ -2577,8 +2576,12 @@ public class JingleRtpConnection extends AbstractJingleConnection sessionDescription = setLocalSessionDescription(); } catch (final Exception e) { final Throwable cause = Throwables.getRootCause(e); - Log.d(Config.LOGTAG, "failed to renegotiate", cause); webRTCWrapper.close(); + if (isTerminated()) { + Log.d(Config.LOGTAG, "failed to renegotiate. session was already terminated", cause); + return; + } + Log.d(Config.LOGTAG, "failed to renegotiate. sending session-terminate", cause); sendSessionTerminate(Reason.FAILED_APPLICATION, cause.getMessage()); return; }