From 10624e87f55624213437a2709a25f582da942740 Mon Sep 17 00:00:00 2001 From: virtuacoplenny Date: Thu, 17 Jan 2019 16:04:35 -0800 Subject: [PATCH] ref(conference): change when the room reference is removed (#3808) Delay removing the room reference. This is in case a consumer of the API is attempting to submit feedback after hangup but before redirecting to another page. If the room reference is removed, feedback submission will fail during this period. --- conference.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/conference.js b/conference.js index 475df72b8..af909486e 100644 --- a/conference.js +++ b/conference.js @@ -2509,6 +2509,9 @@ export default { requestFeedbackPromise, this.leaveRoomAndDisconnect() ]).then(values => { + this._room = undefined; + room = undefined; + APP.API.notifyReadyToClose(); maybeRedirectToWelcomePage(values[0]); }); @@ -2523,11 +2526,7 @@ export default { APP.store.dispatch(conferenceWillLeave(room)); return room.leave() - .then(disconnect, disconnect) - .then(() => { - this._room = undefined; - room = undefined; - }); + .then(disconnect, disconnect); }, /**