shut down the node on, er, shutdown

This commit is contained in:
jrandom
2004-08-22 06:12:10 +00:00
committed by zzz
parent 2c907060d4
commit b126b19e03

View File

@@ -72,6 +72,9 @@ public class Node {
node.loadConfig();
node.startup();
while (true) {
//try { Thread.sleep(10*1000); } catch (InterruptedException ie) {}
//node.shutdown();
//if (true) return;
synchronized (node) {
try { node.wait(); } catch (InterruptedException ie) {}
}
@@ -127,6 +130,9 @@ public class Node {
public void startup() {
boolean connected = connect();
if (connected) {
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
public void run() { shutdown(); }
}));
loadServices();
startServices();
synchronized (_nodes) {