瀏覽代碼

Only fire DATA_CHANNEL_CLOSED when using a websocket. (#2237)

master
bgrozev 2 年之前
父節點
當前提交
ba7ddbdce7
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 7 行新增7 行删除
  1. 7
    7
      modules/RTC/BridgeChannel.js

+ 7
- 7
modules/RTC/BridgeChannel.js 查看文件

@@ -395,14 +395,14 @@ export default class BridgeChannel {
395 395
 
396 396
                 if (this._mode === 'websocket') {
397 397
                     this._retryWebSocketConnection(event);
398
-                }
399 398
 
400
-                // We only want to send this event the first time the failure happens.
401
-                if (this._connected !== false) {
402
-                    emitter.emit(RTCEvents.DATA_CHANNEL_CLOSED, {
403
-                        code,
404
-                        reason
405
-                    });
399
+                    // We only want to send this event the first time the failure happens.
400
+                    if (this._connected !== false) {
401
+                        emitter.emit(RTCEvents.DATA_CHANNEL_CLOSED, {
402
+                            code,
403
+                            reason
404
+                        });
405
+                    }
406 406
                 }
407 407
             }
408 408
 

Loading…
取消
儲存