Sfoglia il codice sorgente

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

master
bgrozev 2 anni fa
parent
commit
ba7ddbdce7
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. 7
    7
      modules/RTC/BridgeChannel.js

+ 7
- 7
modules/RTC/BridgeChannel.js Vedi File

@@ -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…
Annulla
Salva