summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/cow/CowSessionManager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/cow/CowSessionManager.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/cow/CowSessionManager.java
index 197341fe..8413c04d 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/cow/CowSessionManager.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/cow/CowSessionManager.java
@@ -51,7 +51,7 @@ public class CowSessionManager {
}
}
- public static boolean add(String id, CowSession session) {
+ private static boolean add(String id, CowSession session) {
Lock lock = SESSION_LOCK.writeLock();
lock.lock();
try {
@@ -72,6 +72,7 @@ public class CowSessionManager {
UserInfo user = SessionManager.get(cowid);
if (user == null)
throw new RuntimeException("Unknown user");
+ SessionManager.remove(cowid);
//
String sessionId = UUID.randomUUID().toString();
CowSession session = new CowSession(ld.imagePath, ld.configuration, ld.imageBaseId, ld.vmName, ld.restricted, user, sessionType);