diff libervia/backend/plugins/plugin_xep_0167/mapping.py @ 4116:23fa52acf72c

plugin XEP-0167, XEP-0176: transport-info and ICE candidate sending are delayed if session is not active yet
author Goffi <goffi@goffi.org>
date Mon, 21 Aug 2023 15:19:45 +0200
parents 4b842c1fb686
children b2709504586a
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0167/mapping.py	Wed Aug 16 18:33:28 2023 +0200
+++ b/libervia/backend/plugins/plugin_xep_0167/mapping.py	Mon Aug 21 15:19:45 2023 +0200
@@ -439,12 +439,11 @@
         try:
             ice_candidates = first_content["transport_data"]["candidates"]
         except KeyError:
-            log.warning("missing candidates in SDP")
-        else:
-            for idx, content in enumerate(all_media.values()):
-                if idx == 0:
-                    continue
-                content["transport_data"].setdefault("candidates", ice_candidates)
+            ice_candidates = []
+        for idx, content in enumerate(all_media.values()):
+            if idx == 0:
+                continue
+            content["transport_data"].setdefault("candidates", ice_candidates)
 
     return call_data