From 9fc04c4b1ed23cc2ee157d75a74e45a6bdb867b6 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 8 Apr 2021 10:23:37 +0200 Subject: [PATCH] when receiving out-of-order session-init in terminal state do not move to terminal again fixes #4049 --- .../xmpp/jingle/JingleRtpConnection.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 638fa8cf8..1f9eeb3c4 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -320,7 +320,16 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web private void receiveSessionInitiate(final JinglePacket jinglePacket) { if (isInitiator()) { Log.d(Config.LOGTAG, String.format("%s: received session-initiate even though we were initiating", id.account.getJid().asBareJid())); - terminateWithOutOfOrder(jinglePacket); + if (isTerminated()) { + Log.d(Config.LOGTAG, String.format( + "%s: got a reason to terminate with out-of-order. but already in state %s", + id.account.getJid().asBareJid(), + getState() + )); + respondWithOutOfOrder(jinglePacket); + } else { + terminateWithOutOfOrder(jinglePacket); + } return; } final RtpContentMap contentMap;