Browse Source

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 years ago
parent
commit
7704809c4c
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      react/features/base/connection/actions.native.js

+ 7
- 1
react/features/base/connection/actions.native.js View File

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

Loading…
Cancel
Save