|
@@ -488,10 +488,13 @@ class ConferenceConnector {
|
488
|
488
|
* call in hangup() to resolve when all operations are finished.
|
489
|
489
|
*/
|
490
|
490
|
function disconnect() {
|
491
|
|
- connection.disconnect();
|
492
|
|
- APP.API.notifyConferenceLeft(APP.conference.roomName);
|
|
491
|
+ const onDisconnected = () => {
|
|
492
|
+ APP.API.notifyConferenceLeft(APP.conference.roomName);
|
493
|
493
|
|
494
|
|
- return Promise.resolve();
|
|
494
|
+ return Promise.resolve();
|
|
495
|
+ };
|
|
496
|
+
|
|
497
|
+ return connection.disconnect().then(onDisconnected, onDisconnected);
|
495
|
498
|
}
|
496
|
499
|
|
497
|
500
|
/**
|
|
@@ -2603,8 +2606,7 @@ export default {
|
2603
|
2606
|
leaveRoomAndDisconnect() {
|
2604
|
2607
|
APP.store.dispatch(conferenceWillLeave(room));
|
2605
|
2608
|
|
2606
|
|
- return room.leave()
|
2607
|
|
- .then(disconnect, disconnect);
|
|
2609
|
+ return room.leave().then(disconnect, disconnect);
|
2608
|
2610
|
},
|
2609
|
2611
|
|
2610
|
2612
|
/**
|