openvidu-server: change order of session store and removal from maps

pull/391/head
pabloFuente 2020-01-31 12:46:18 +01:00
parent c2af1aab01
commit e663680b48
2 changed files with 3 additions and 3 deletions

View File

@ -524,8 +524,8 @@ public class KurentoSessionManager extends SessionManager {
} }
session = new KurentoSession(sessionNotActive, kms, kurentoSessionEventsHandler, kurentoEndpointConfig); session = new KurentoSession(sessionNotActive, kms, kurentoSessionEventsHandler, kurentoEndpointConfig);
sessionsNotActive.remove(session.getSessionId());
KurentoSession oldSession = (KurentoSession) sessions.putIfAbsent(session.getSessionId(), session); KurentoSession oldSession = (KurentoSession) sessions.putIfAbsent(session.getSessionId(), session);
sessionsNotActive.remove(session.getSessionId());
if (oldSession != null) { if (oldSession != null) {
log.warn("Session '{}' has just been created by another thread", session.getSessionId()); log.warn("Session '{}' has just been created by another thread", session.getSessionId());
return oldSession; return oldSession;

View File

@ -206,8 +206,8 @@ public class SingleStreamRecordingService extends RecordingService {
return finalRecordingArray[0]; return finalRecordingArray[0];
} }
public void startRecorderEndpointForPublisherEndpoint(Session session, String recordingId, public void startRecorderEndpointForPublisherEndpoint(final Session session, String recordingId,
MediaProfileSpecType profile, Participant participant, CountDownLatch globalStartLatch) { MediaProfileSpecType profile, final Participant participant, CountDownLatch globalStartLatch) {
log.info("Starting single stream recorder for stream {} in session {}", participant.getPublisherStreamId(), log.info("Starting single stream recorder for stream {} in session {}", participant.getPublisherStreamId(),
session.getSessionId()); session.getSessionId());