Просмотр исходного кода

feat(base/connection): log leave failure reason

Because there are multiple reasons on why a conference.leave() may fail
it's helpful to know if and why it happened.
master
paweldomas 7 лет назад
Родитель
Сommit
7704809c4c
1 измененных файлов: 7 добавлений и 1 удалений
  1. 7
    1
      react/features/base/connection/actions.native.js

+ 7
- 1
react/features/base/connection/actions.native.js Просмотреть файл

@@ -15,6 +15,8 @@ import {
15 15
     SET_LOCATION_URL
16 16
 } from './actionTypes';
17 17
 
18
+const logger = require('jitsi-meet-logger').getLogger(__filename);
19
+
18 20
 /**
19 21
  * The error structure passed to the {@link connectionFailed} action.
20 22
  *
@@ -322,7 +324,11 @@ export function disconnect() {
322 324
 
323 325
             promise
324 326
                 = conference_.leave()
325
-                    .catch(() => {
327
+                    .catch(error => {
328
+                        logger.warn(
329
+                            'JitsiConference.leave() rejected with: ',
330
+                            error);
331
+
326 332
                         // The library lib-jitsi-meet failed to make the
327 333
                         // JitsiConference leave. Which may be because
328 334
                         // JitsiConference thinks it has already left.

Загрузка…
Отмена
Сохранить