Fixed possible NPE, improved server timeout

This commit is contained in:
Oleg Agafonov 2023-04-14 19:07:08 +04:00
parent bc5c381fef
commit 517ee16a60
3 changed files with 9 additions and 4 deletions

View file

@ -178,6 +178,7 @@ public class MageServerImpl implements MageServer {
throw new MageException("Wrong client version " + version + ", expecting version " + Main.getVersion());
}
if (!adminPassword.equals(this.adminPassword)) {
Thread.sleep(3000);
throw new MageException("Wrong password");
}
return managerFactory.sessionManager().connectAdmin(sessionId);