Przeglądaj źródła

fix(JitsiConference): a crash

Avoid a crash if for whatever reason there is no JVB JingleSessionPC at
the time when P2P is being stopped.

Add FIXME about possible situation where Jicofo invite will arrive after
the P2P has been established already.
dev1
paweldomas 8 lat temu
rodzic
commit
528a4e88fb
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6
    1
      JitsiConference.js

+ 6
- 1
JitsiConference.js Wyświetl plik

@@ -2023,6 +2023,9 @@ JitsiConference.prototype._onIceConnectionEstablished
2023 2023
 
2024 2024
     // Stop media transfer over the JVB connection
2025 2025
     if (this.jvbJingleSession) {
2026
+        // FIXME if for whatever reason invite from Jicofo for the JVB
2027
+        // connection arrives, after the P2P has been established
2028
+        // this needs to be called as well.
2026 2029
         this._suspendMediaTransferForJvbConnection();
2027 2030
     }
2028 2031
 
@@ -2295,7 +2298,9 @@ JitsiConference.prototype._stopP2PSession
2295 2298
 
2296 2299
     // Swap remote tracks, but only if the P2P has been fully established
2297 2300
     if (wasP2PEstablished) {
2298
-        this._resumeMediaTransferForJvbConnection();
2301
+        if (this.jvbJingleSession) {
2302
+            this._resumeMediaTransferForJvbConnection();
2303
+        }
2299 2304
 
2300 2305
         // Remove remote P2P tracks
2301 2306
         this._removeRemoteP2PTracks();

Ładowanie…
Anuluj
Zapisz