diff --git a/src/main/java/com/jamesquinley/DelegationServices/localNet.java b/src/main/java/com/jamesquinley/DelegationServices/localNet.java index 8eaf68a..34fe64f 100644 --- a/src/main/java/com/jamesquinley/DelegationServices/localNet.java +++ b/src/main/java/com/jamesquinley/DelegationServices/localNet.java @@ -1,5 +1,6 @@ package com.jamesquinley.DelegationServices; +import com.jamesquinley.Asecure.electronicMailHandler; import com.jamesquinley.Asecure.secureCalls; import com.mongodb.BasicDBObject; @@ -14,8 +15,13 @@ public class localNet { } else { System.out.println("Hey this user Logged In From A new Location, dispatching email!"); - secureCalls.locationBasedEmail(email,UName,NewMac, OldMac); - System.out.println("Switching Trusted Net To New Local"); + final Runnable runnable = new Runnable() { + public void run() { + secureCalls.locationBasedEmail(email,UName,NewMac, OldMac); + } + }; + runnable.run(); + System.out.println("Switching Trusted Net To New Local"); BasicDBObject searchQuery = new BasicDBObject(); searchQuery.append("Token", Token); BasicDBObject updateQuery = new BasicDBObject(); diff --git a/src/main/java/com/jamesquinley/Main.java b/src/main/java/com/jamesquinley/Main.java index e79ab27..4da15f7 100644 --- a/src/main/java/com/jamesquinley/Main.java +++ b/src/main/java/com/jamesquinley/Main.java @@ -6,13 +6,14 @@ 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 { - public static void main(String[] args) { + public static void main(String[] args) throws InterruptedException { 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."); System.out.println("We've started everything, requests are now being served"); while (true) { isolatedTimer(); + Thread.sleep(500); } }