From 7704809c4c0cc6e98a868a72c49df37ffea36118 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Thu, 17 May 2018 09:53:51 -0500 Subject: [PATCH] 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. --- react/features/base/connection/actions.native.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.js index 39d9f11a0..60c5a9eb1 100644 --- a/react/features/base/connection/actions.native.js +++ b/react/features/base/connection/actions.native.js @@ -15,6 +15,8 @@ import { SET_LOCATION_URL } from './actionTypes'; +const logger = require('jitsi-meet-logger').getLogger(__filename); + /** * The error structure passed to the {@link connectionFailed} action. * @@ -322,7 +324,11 @@ export function disconnect() { promise = conference_.leave() - .catch(() => { + .catch(error => { + logger.warn( + 'JitsiConference.leave() rejected with: ', + error); + // The library lib-jitsi-meet failed to make the // JitsiConference leave. Which may be because // JitsiConference thinks it has already left.