diff --git a/Common/src/com/common/thread/ThreadService.java b/Common/src/com/common/thread/ThreadService.java index 9132633..498169e 100644 --- a/Common/src/com/common/thread/ThreadService.java +++ b/Common/src/com/common/thread/ThreadService.java @@ -146,7 +146,7 @@ public class ThreadService { //Wait until the thread is told to run again// try { //Make sure we don't have a target.// - if(getTarget() == null) { + if((target = getTarget()) == null) { //Wait for the next run of this thread// wait(); }//if// @@ -154,8 +154,7 @@ public class ThreadService { catch(InterruptedException e) { return; }//catch// - - target = getTarget(); + setTarget(null); }//synchronized// diff --git a/Foundation Web Core/src/com/foundation/web/server/WebServer.java b/Foundation Web Core/src/com/foundation/web/server/WebServer.java index 576da51..084bc38 100644 --- a/Foundation Web Core/src/com/foundation/web/server/WebServer.java +++ b/Foundation Web Core/src/com/foundation/web/server/WebServer.java @@ -2074,10 +2074,12 @@ public class WebServer { if(activeThreadCount-- != maxThreadCount) { loop = false; - if(requiresWakeup) { - selector.wakeup(); - }//if// +// if(requiresWakeup) { +// selector.wakeup(); +// }//if// }//if// + + selector.wakeup(); }//synchronized// }//finally// }//else if//