mirror of https://github.com/OpenVidu/openvidu.git
openvidu-testapp: better end scenario logic
parent
888f0bdb7e
commit
5bacf37523
|
@ -103,9 +103,12 @@ export class TestScenariosComponent implements OnInit, OnDestroy {
|
|||
this.scenarioPlaying = true;
|
||||
}
|
||||
|
||||
endScenario() {
|
||||
for (const user of this.users) {
|
||||
user.room.disconnect();
|
||||
async endScenario() {
|
||||
await Promise.all(this.users.map((user) => user.room.disconnect()));
|
||||
try {
|
||||
await this.roomApiService.deleteRoom(this.fixedRoomId);
|
||||
} catch (error: any) {
|
||||
console.error(JSON.stringify(error));
|
||||
}
|
||||
this.users = [];
|
||||
this.scenarioPlaying = false;
|
||||
|
|
Loading…
Reference in New Issue