Kaynağa Gözat

feat(errors): fix error handling for connection and conference

Properly handle errors while connecting or joining a conference. Prior to this
patch, only errors on established conferences / connections were saved to the
redux store.
master
Saúl Ibarra Corretgé 8 yıl önce
ebeveyn
işleme
de0d69a20e

+ 4
- 1
react/features/base/conference/reducer.js Dosyayı Görüntüle

@@ -82,7 +82,10 @@ ReducerRegistry.register('features/base/conference', (state = {}, action) => {
82 82
  * reduction of the specified action.
83 83
  */
84 84
 function _conferenceFailed(state, { conference, error }) {
85
-    if (state.conference && state.conference !== conference) {
85
+    // The active conference or the one we are joining.
86
+    const conference_ = state.conference || state.joining;
87
+
88
+    if (conference_ && conference_ !== conference) {
86 89
         return state;
87 90
     }
88 91
 

+ 5
- 1
react/features/base/connection/reducer.js Dosyayı Görüntüle

@@ -96,7 +96,11 @@ function _connectionFailed(
96 96
             connection: Object,
97 97
             error: Object | string
98 98
         }) {
99
-    if (state.connection && state.connection !== connection) {
99
+
100
+    // The active or in-progress connection.
101
+    const connection_ = state.connecting || state.connection;
102
+
103
+    if (connection_ && connection_ !== connection) {
100 104
         return state;
101 105
     }
102 106
 

Loading…
İptal
Kaydet