diff --git a/conference.js b/conference.js index 618b230a2..c20bb505d 100644 --- a/conference.js +++ b/conference.js @@ -123,15 +123,15 @@ function muteLocalVideo (muted) { * @param {boolean} [requestFeedback=false] if user feedback should be requested */ function hangup (requestFeedback = false) { - let promise = Promise.resolve(); - - if (requestFeedback) { - promise = APP.UI.requestFeedback(); - } - - promise.then(function () { + APP.conference._room.leave().then(() => { connection.disconnect(); + let promise = Promise.resolve(); + if (requestFeedback) { + promise = APP.UI.requestFeedback(); + } + return promise; + }).then(function () { if (!config.enableWelcomePage) { return; }