openvidu-server: joinRoom try-finally extended

pull/419/head
pabloFuente 2020-03-31 19:52:07 +02:00
parent 3e02a1b31f
commit 6518166c0b
1 changed files with 4 additions and 4 deletions

View File

@ -257,11 +257,11 @@ public class RpcHandler extends DefaultJsonRpcHandler<JsonObject> {
// While closing a session users can't join // While closing a session users can't join
if (session.closingLock.readLock().tryLock()) { if (session.closingLock.readLock().tryLock()) {
if (session.isClosed()) {
throw new OpenViduException(Code.ROOM_CLOSED_ERROR_CODE,
"Unable to join the session. Session " + sessionId + " is closed");
}
try { try {
if (session.isClosed()) {
throw new OpenViduException(Code.ROOM_CLOSED_ERROR_CODE,
"Unable to join the session. Session " + sessionId + " is closed");
}
Participant participant; Participant participant;
if (generateRecorderParticipant) { if (generateRecorderParticipant) {
participant = sessionManager.newRecorderParticipant(sessionId, participantPrivatetId, participant = sessionManager.newRecorderParticipant(sessionId, participantPrivatetId,