From 1a969fdec4bc6d46412487f50b442af436ecefe5 Mon Sep 17 00:00:00 2001 From: James Quinley Date: Sat, 26 Nov 2022 07:47:02 -0800 Subject: [PATCH] Get things back to mostly stable. --- .../DelegationServices/delegationServices.java | 14 ++++---------- src/main/java/com/jamesquinley/Main.java | 12 ++++++++++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java index bef6ce1..5a16293 100644 --- a/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java +++ b/src/main/java/com/jamesquinley/DelegationServices/delegationServices.java @@ -2184,17 +2184,11 @@ public class delegationServices { } public static void userAuthetication() { - while (true) { - final Runnable runnable = new Runnable() { - public void run() { - Lrequest = dCollection.find(eq("status", false)).first(); - if (!(Lrequest == null)) { + Lrequest = dCollection.find(eq("status", false)).first(); + if (!(Lrequest == null)) { delegationProcesser(); - } - } - }; - runnable.run(); - } + } + } diff --git a/src/main/java/com/jamesquinley/Main.java b/src/main/java/com/jamesquinley/Main.java index a97baf6..4099e31 100644 --- a/src/main/java/com/jamesquinley/Main.java +++ b/src/main/java/com/jamesquinley/Main.java @@ -3,7 +3,7 @@ package com.jamesquinley; import com.jamesquinley.DelegationServices.status; /** -Hey there! This is the source code for AOTSK-Delegation Server, self explanitory. +Hey there! This is the source code for AOTSK-Delegation Server, self explanatory. Also this is multi line so I can justify using this type of comment. */ public class Main @@ -13,7 +13,15 @@ public class Main com.jamesquinley.DelegationServices.delegationServices.connectionInit(status.betaServer); com.jamesquinley.DelegationServices.delegationServices.Purge(); System.out.println( "We're starting the login delegation server, please wait one moment while we check a few things."); - com.jamesquinley.DelegationServices.delegationServices.userAuthetication(); System.out.println("We've started everything, requests are now being served"); + while (true) { + + try { + Thread.sleep(500); + com.jamesquinley.DelegationServices.delegationServices.userAuthetication(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } } }