Merge pull request #16571 from paultrudel/multi-user-join-issue

This commit is contained in:
Gustavo Trott 2023-01-26 16:46:56 -03:00 committed by GitHub
commit 701a355ef2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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);