openvidu-server: session already created message improved

pull/651/head
pabloFuente 2021-09-10 14:41:49 +02:00
parent 8eae2e0eab
commit 67fad6a3ce
1 changed files with 1 additions and 0 deletions

View File

@ -112,6 +112,7 @@ public class SessionRestController {
String sessionId;
if (sessionProperties.customSessionId() != null && !sessionProperties.customSessionId().isEmpty()) {
if (sessionManager.getSessionWithNotActive(sessionProperties.customSessionId()) != null) {
log.warn("Session {} is already created", sessionProperties.customSessionId());
return new ResponseEntity<>(HttpStatus.CONFLICT);
}
sessionId = sessionProperties.customSessionId();