diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ValidateAuthTokenReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ValidateAuthTokenReqMsgHdlr.scala index f9ae376609..cdaf704920 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ValidateAuthTokenReqMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/users/ValidateAuthTokenReqMsgHdlr.scala @@ -5,7 +5,7 @@ import org.bigbluebutton.core.bus.InternalEventBus import org.bigbluebutton.core.domain.MeetingState2x import org.bigbluebutton.core.models._ import org.bigbluebutton.core.running.{ HandlerHelpers, LiveMeeting, OutMsgRouter } -import org.bigbluebutton.core2.message.senders.{ MsgBuilder } +import org.bigbluebutton.core2.message.senders.MsgBuilder trait ValidateAuthTokenReqMsgHdlr extends HandlerHelpers { this: UsersApp => @@ -20,6 +20,7 @@ trait ValidateAuthTokenReqMsgHdlr extends HandlerHelpers { var failReason = "Invalid auth token." var failReasonCode = EjectReasonCode.VALIDATE_TOKEN + log.info("Number of registered users [{}]", RegisteredUsers.numRegisteredUsers(liveMeeting.registeredUsers)) val regUser = RegisteredUsers.getRegisteredUserWithToken(msg.body.authToken, msg.body.userId, liveMeeting.registeredUsers) regUser match { diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala index c92bd627e9..5169ba5068 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/models/RegisteredUsers.scala @@ -72,6 +72,10 @@ object RegisteredUsers { regUsers.toVector.filter(_.joined).map(_.externId).distinct.length } + def numRegisteredUsers(regUsers: RegisteredUsers): Int = { + regUsers.toVector.size + } + def add(users: RegisteredUsers, user: RegisteredUser): Vector[RegisteredUser] = { findWithExternUserId(user.externId, users) match { diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java index 58c928c2eb..e83f9f8091 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/MeetingService.java @@ -263,7 +263,9 @@ public class MeetingService implements MessageListener { RegisteredUser ru = registeredUser.getValue(); long elapsedTime = now - ru.getGuestWaitedOn(); + log.info("Determining if user [{}] should be purged. Elapsed time waiting [{}] with guest status [{}]", registeredUserID, elapsedTime, ru.getGuestStatus()); if (elapsedTime >= waitingGuestUsersTimeout && ru.getGuestStatus() == GuestPolicy.WAIT) { + log.info("Purging user [{}]", registeredUserID); if (meeting.userUnregistered(registeredUserID) != null) { gw.guestWaitingLeft(meeting.getInternalId(), registeredUserID); meeting.setLeftGuestLobby(registeredUserID, true);