소스 검색

Adds check for datachanel state before sending data.

j8
hristoterezov 10 년 전
부모
커밋
386e10a966
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      app.js

+ 1
- 1
app.js 파일 보기

@@ -1440,7 +1440,7 @@ $(document).bind('fatalError.jingle',
1440 1440
 function onSelectedEndpointChanged(userJid)
1441 1441
 {
1442 1442
     console.log('selected endpoint changed: ', userJid);
1443
-    if (_dataChannels && _dataChannels.length != 0) {
1443
+    if (_dataChannels && _dataChannels.length != 0 && _dataChannels[0].readyState == "open") {
1444 1444
         _dataChannels[0].send(JSON.stringify({
1445 1445
             'colibriClass': 'SelectedEndpointChangedEvent',
1446 1446
             'selectedEndpoint': (!userJid || userJid == null)

Loading…
취소
저장