Skip to content

Commit

Permalink
openvidu-testapp: better end scenario logic
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Sep 19, 2024
1 parent 888f0bd commit 5bacf37
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5bacf37

Please sign in to comment.