|
|
@ -440,7 +440,7 @@ public final class serverCore extends serverAbstractBusyThread implements server
|
|
|
|
s.interrupt();
|
|
|
|
s.interrupt();
|
|
|
|
s.close();
|
|
|
|
s.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.busySessions = null;
|
|
|
|
this.busySessions.clear();
|
|
|
|
|
|
|
|
|
|
|
|
this.log.logConfig("* terminated");
|
|
|
|
this.log.logConfig("* terminated");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -918,11 +918,9 @@ public final class serverCore extends serverAbstractBusyThread implements server
|
|
|
|
if (currentThread.isInterrupted()) throw new InterruptedException();
|
|
|
|
if (currentThread.isInterrupted()) throw new InterruptedException();
|
|
|
|
if ((currentThread instanceof serverCore.Session) && ((serverCore.Session)currentThread).isStopped()) throw new InterruptedException();
|
|
|
|
if ((currentThread instanceof serverCore.Session) && ((serverCore.Session)currentThread).isStopped()) throw new InterruptedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public void reconnect() {
|
|
|
|
|
|
|
|
this.reconnect(5000);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void reconnect(int delay) {
|
|
|
|
public void reconnect(int delay) {
|
|
|
|
Thread restart = new Restarter();
|
|
|
|
Thread restart = new Restarter(delay);
|
|
|
|
restart.start();
|
|
|
|
restart.start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -930,6 +928,9 @@ public final class serverCore extends serverAbstractBusyThread implements server
|
|
|
|
public class Restarter extends Thread {
|
|
|
|
public class Restarter extends Thread {
|
|
|
|
public serverCore theServerCore = null;
|
|
|
|
public serverCore theServerCore = null;
|
|
|
|
public int delay = 5000;
|
|
|
|
public int delay = 5000;
|
|
|
|
|
|
|
|
public Restarter(int delay) {
|
|
|
|
|
|
|
|
this.delay = delay;
|
|
|
|
|
|
|
|
}
|
|
|
|
public void run() {
|
|
|
|
public void run() {
|
|
|
|
// waiting for a while
|
|
|
|
// waiting for a while
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -940,10 +941,10 @@ public final class serverCore extends serverAbstractBusyThread implements server
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// signaling restart
|
|
|
|
// signaling restart
|
|
|
|
serverCore.this.forceRestart = true;
|
|
|
|
forceRestart = true;
|
|
|
|
|
|
|
|
|
|
|
|
// closing socket to notify the thread
|
|
|
|
// closing socket to notify the thread
|
|
|
|
serverCore.this.close();
|
|
|
|
close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|