maxParticipants: bbb-web loses track of a participant who rejoins a full meeting with the same userID
Describe the bug
On a meeting which has reached maxParticipants, a participant who drops and comes back through a new join call with the same userID gets in, as intended. bbb-web never records them: for the rest of the meeting getMeetingInfo reports one participant less than the meeting has.
Later bbb-web accepts a join for one person more than the limit. That person is refused in the client by akka-apps.
To Reproduce
createwithmaxParticipants=3.joinP1 withuserID=person-1, then P2 and P3. Open the three clients.- Close P1's tab. Call
joinagain for P1 withuserID=person-1, open the client. P1 is in the meeting. - Call
getMeetingInfo. - Wait 90 s, then
joina fourth person.
Expected behavior
getMeetingInfo lists P1, P2 and P3. The fourth person is refused by join with maxParticipantsReached.
Actual behavior
bbb-web (getMeetingInfo) |
akka-apps (user.joined in bbb_graphql) |
|
|---|---|---|
| Before P1 drops | 3: P1, P2, P3 | 3: P1, P2, P3 |
| P1 is back | 2: P2, P3 | 3: P2, P3, P1 |
| 150 s later | 2: P2, P3 | 3: P2, P3, P1 |
For the fourth person join answers SUCCESS, the client loads and akka-apps refuses (user.joinErrorCode = max_participants_reason).
Result: FAIL in 3 runs out of 3.
BBB version
- Confirmed on 4.0: 4.0.0-rc.2 based build of
v4.0.x-develop(bbb-web at 415098923f). The code involved is unchanged on the currentv4.0.x-develop(d094095e2a). - Same code on
v3.0.37, read but not run.
Additional context
MeetingService.userJoined drops the user when the limit is reached:
if(m.getMaxUsers() > 0 && m.countUniqueExtIds() >= m.getMaxUsers() && !user.isBot()) {
m.removeEnteredUser(user.getInternalUserId());
return;
}
m.userJoined(user);The two other checks let a known external id through (userExtIdAlreadyJoined in ApiController.hasReachedMaxParticipants, userHasJoinedAlready in validateMaxParticipants of akka-apps). This one does not. When P1 comes back, the first P1 is still in users, the count is 3, and the second P1 is never added.
Source: bigbluebutton/bigbluebutton