Fixed NullPointerException

This commit is contained in:
Finn
2026-01-18 15:28:19 +01:00
parent c408c94288
commit 50eac7dbd5
2 changed files with 3 additions and 2 deletions

View File

@@ -59,6 +59,7 @@ public abstract class ProtocolWebServer {
/**
* The configuration for the web server.
*/
@Getter
private final WebServerConfig serverConfig;
/**
* The reference to the ProtocolBridge Object

View File

@@ -128,7 +128,7 @@ public final class SessionManager {
this.login = login;
this.ip = ip;
this.userAgent = userAgent;
this.expiresAt = System.currentTimeMillis() + (long) protocolWebServer.getConfigurationManager().getInt("sessionexpireminutes") * 60 * 1000;
this.expiresAt = System.currentTimeMillis() + (long) protocolWebServer.getServerConfig().getSessionExpiration() * 60 * 1000;
}
/**
@@ -158,7 +158,7 @@ public final class SessionManager {
* @throws IOException If an I/O error occurs.
*/
void refresh(ProtocolWebServer protocolWebServer) throws IOException {
this.expiresAt = System.currentTimeMillis() + (long) protocolWebServer.getConfigurationManager().getInt("sessionexpireminutes") * 60 * 1000;
this.expiresAt = System.currentTimeMillis() + (long) protocolWebServer.getServerConfig().getSessionExpiration() * 60 * 1000;
}
}
}