Sfoglia il codice sorgente

Fixes crash (#452)

* fix(JingleSessionPC): do not log whole object
* fix(JitsiConference): fix a crash

The code will crash if there's neither P2P nor JVB session yet.
tags/v0.0.2
Paweł Domas 8 anni fa
parent
commit
f02e52e1f4
2 ha cambiato i file con 11 aggiunte e 2 eliminazioni
  1. 1
    1
      JitsiConference.js
  2. 10
    1
      modules/xmpp/JingleSessionPC.js

+ 1
- 1
JitsiConference.js Vedi File

1762
     } else {
1762
     } else {
1763
         ssrc = track.getSSRC();
1763
         ssrc = track.getSSRC();
1764
     }
1764
     }
1765
-    if (!container.id || !ssrc) {
1765
+    if (!container.id || !ssrc || !peerConnection) {
1766
         return;
1766
         return;
1767
     }
1767
     }
1768
 
1768
 

+ 10
- 1
modules/xmpp/JingleSessionPC.js Vedi File

977
         // Do something with reason and reasonCondition when we start to care
977
         // Do something with reason and reasonCondition when we start to care
978
         // this.reasonCondition = reasonCondition;
978
         // this.reasonCondition = reasonCondition;
979
         // this.reasonText = reasonText;
979
         // this.reasonText = reasonText;
980
-        logger.info('Session terminated', this, reasonCondition, reasonText);
980
+        logger.info(`Session terminated ${this}`, reasonCondition, reasonText);
981
 
981
 
982
         this.close();
982
         this.close();
983
     }
983
     }
1813
                     && this.peerconnection.connectionState !== 'closed'))
1813
                     && this.peerconnection.connectionState !== 'closed'))
1814
             && this.peerconnection.close();
1814
             && this.peerconnection.close();
1815
     }
1815
     }
1816
+
1817
+    /**
1818
+     * Converts to string with minor summary.
1819
+     * @return {string}
1820
+     */
1821
+    toString() {
1822
+        return `JingleSessionPC[p2p=${this.isP2P},`
1823
+                    + `initiator=${this.isInitiator},sid=${this.sid}]`;
1824
+    }
1816
 }
1825
 }

Loading…
Annulla
Salva