From c5f801c1fe31b2bfc47d45d33fd4e3f4d42701de Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 3 Mar 2021 13:12:10 +0100 Subject: [PATCH] do not push empty candidates to backlog --- .../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 523d8d5cd..ecbf73729 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java @@ -352,8 +352,11 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web } if (transition(target, () -> this.initiatorRtpContentMap = contentMap)) { respondOk(jinglePacket); - //TODO Do not push empty set - pendingIceCandidates.push(contentMap.contents.entrySet()); + + final Set> candidates = contentMap.contents.entrySet(); + if (candidates.size() > 0) { + pendingIceCandidates.push(candidates); + } if (target == State.SESSION_INITIALIZED_PRE_APPROVED) { Log.d(Config.LOGTAG, id.account.getJid().asBareJid() + ": automatically accepting session-initiate"); sendSessionAccept();