Explorar el Código

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

master
bgrozev hace 2 años
padre
commit
ba7ddbdce7
No account linked to committer's email address
Se han modificado 1 ficheros con 7 adiciones y 7 borrados
  1. 7
    7
      modules/RTC/BridgeChannel.js

+ 7
- 7
modules/RTC/BridgeChannel.js Ver fichero

@@ -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…
Cancelar
Guardar