Modified ThreadService & Scheduler to allow the web server to pass a delegate service such that all webapps will use one service for each function (reduction in threading and debug complexity).
This commit is contained in:
@@ -1468,7 +1468,7 @@ public final boolean sendMessage(byte[] message, SocketData socketData, int mess
|
||||
protected void setupPing() {
|
||||
if(keepAliveInterval >= 500 && keepAliveInterval <= 600000) {
|
||||
setPingTask(Scheduler.addTask(keepAliveInterval, new Scheduler.Task() {
|
||||
public void evaluate() {
|
||||
public void run() {
|
||||
try {
|
||||
sendPing(false);
|
||||
}//try//
|
||||
@@ -1479,7 +1479,7 @@ protected void setupPing() {
|
||||
//Silently die: The ping task wasn't removed.//
|
||||
Scheduler.removeTask(this);
|
||||
}//catch//
|
||||
}//evaluate()//
|
||||
}//run()//
|
||||
}, false));
|
||||
}//if//
|
||||
}//setupPing()//
|
||||
|
||||
@@ -525,7 +525,7 @@ public class Orb {
|
||||
this.socket = socket;
|
||||
this.name = name;
|
||||
}//CloseSocketTask()//
|
||||
public synchronized void evaluate() {
|
||||
public synchronized void run() {
|
||||
if(!hasRun) {
|
||||
Scheduler.removeTask(this);
|
||||
|
||||
@@ -538,7 +538,7 @@ public class Orb {
|
||||
|
||||
hasRun = true;
|
||||
}//if//
|
||||
}//evaluate()//
|
||||
}//run()//
|
||||
}//CloseSocketTask//
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user