mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-06-23 16:05:09 +00:00
Update AnonymusSessionRegistry.java
This commit is contained in:
parent
de8cc4f338
commit
c7e65cfd26
@ -36,16 +36,10 @@ public class AnonymusSessionRegistry implements HttpSessionListener, SessionsInt
|
|||||||
public void sessionCreated(HttpSessionEvent event) {
|
public void sessionCreated(HttpSessionEvent event) {
|
||||||
HttpSession session = event.getSession();
|
HttpSession session = event.getSession();
|
||||||
if (session == null) {
|
if (session == null) {
|
||||||
log.info("Session ist null");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("");
|
|
||||||
System.out.println("Session created with id: " + session.getId());
|
|
||||||
System.out.println("");
|
|
||||||
|
|
||||||
if (sessions.containsKey(session.getId())) {
|
if (sessions.containsKey(session.getId())) {
|
||||||
log.info("Session {} existiert bereits", session.getId());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +52,6 @@ public class AnonymusSessionRegistry implements HttpSessionListener, SessionsInt
|
|||||||
int allNonExpiredSessions = getAllNonExpiredSessions().size();
|
int allNonExpiredSessions = getAllNonExpiredSessions().size();
|
||||||
|
|
||||||
if (allNonExpiredSessions >= MAX_SESSIONS) {
|
if (allNonExpiredSessions >= MAX_SESSIONS) {
|
||||||
log.info("Maximale Anzahl an Sessions erreicht");
|
|
||||||
sessions.put(
|
sessions.put(
|
||||||
session.getId(),
|
session.getId(),
|
||||||
new AnonymusSessionInfo(session, creationTime, creationTime, true));
|
new AnonymusSessionInfo(session, creationTime, creationTime, true));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user