From b779717d5fc6f41822ac36188eb59959aff3c273 Mon Sep 17 00:00:00 2001 From: Ajay Kumar Date: Tue, 29 Dec 2020 06:09:34 +0530 Subject: [PATCH] disable locking for empty session deletion --- .../kurento/core/KurentoSessionManager.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java b/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java index e3f9448e..a8b2f3c1 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java +++ b/openvidu-server/src/main/java/io/openvidu/server/kurento/core/KurentoSessionManager.java @@ -264,29 +264,29 @@ public class KurentoSessionManager extends SessionManager { this.openviduConfig.getOpenviduRecordingAutostopTimeout(), sessionId); recordingManager.initAutomaticRecordingStopThread(session); } else { - try { - if (session.closingLock.writeLock().tryLock(15, TimeUnit.SECONDS)) { - try { - if (session.isClosed()) { - return false; - } - // log.info("No more participants in session '{}', removing it and closing it", - // sessionId); - // this.closeSessionAndEmptyCollections(session, reason, true); - // sessionClosedByLastParticipant = true; - } finally { - session.closingLock.writeLock().unlock(); - } - } else { - log.error( - "Timeout waiting for Session {} closing lock to be available for closing as last participant left", - sessionId); - } - } catch (InterruptedException e) { - log.error( - "InterruptedException while waiting for Session {} closing lock to be available for closing as last participant left", - sessionId); - } + // try { + // if (session.closingLock.writeLock().tryLock(15, TimeUnit.SECONDS)) { + // try { + // if (session.isClosed()) { + // return false; + // } + // log.info("No more participants in session '{}', removing it and closing it", + // sessionId); + // this.closeSessionAndEmptyCollections(session, reason, true); + // sessionClosedByLastParticipant = true; + // } finally { + // session.closingLock.writeLock().unlock(); + // } + // } else { + // log.error( + // "Timeout waiting for Session {} closing lock to be available for closing as last participant left", + // sessionId); + // } + // } catch (InterruptedException e) { + // log.error( + // "InterruptedException while waiting for Session {} closing lock to be available for closing as last participant left", + // sessionId); + // } } } else if (remainingParticipants.size() == 1 && openviduConfig.isRecordingModuleEnabled() && MediaMode.ROUTED.equals(session.getSessionProperties().mediaMode())