浏览代码

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 年前
父节点
当前提交
de0d69a20e
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 4
    1
      react/features/base/conference/reducer.js
  2. 5
    1
      react/features/base/connection/reducer.js

+ 4
- 1
react/features/base/conference/reducer.js 查看文件

82
  * reduction of the specified action.
82
  * reduction of the specified action.
83
  */
83
  */
84
 function _conferenceFailed(state, { conference, error }) {
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
         return state;
89
         return state;
87
     }
90
     }
88
 
91
 

+ 5
- 1
react/features/base/connection/reducer.js 查看文件

96
             connection: Object,
96
             connection: Object,
97
             error: Object | string
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
         return state;
104
         return state;
101
     }
105
     }
102
 
106
 

正在加载...
取消
保存