From 13b6dc065ef2a819a5fd20f2784bd71400b27b30 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Tue, 15 Aug 2017 12:24:21 -0700 Subject: [PATCH] - fix issue where we cannot start breakout rooms again when the first breakout session ends. --- .../breakout/BreakoutRoomEndedInternalMsgHdlr.scala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/BreakoutRoomEndedInternalMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/BreakoutRoomEndedInternalMsgHdlr.scala index ddc301ffe9..5438a879f9 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/BreakoutRoomEndedInternalMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/breakout/BreakoutRoomEndedInternalMsgHdlr.scala @@ -23,7 +23,17 @@ trait BreakoutRoomEndedInternalMsgHdlr { breakoutModel.removeRoom(msg.meetingId) } - state.update(updatedModel) + updatedModel match { + case Some(model) => + if (model.rooms.isEmpty) { + // All breakout rooms have ended + state.update(None) + } else { + state.update(Some(model)) + } + case None => + state + } } }