diff options
Diffstat (limited to 'same/src/main')
-rw-r--r-- | same/src/main/java/com/orbekk/same/MasterApp.java | 28 | ||||
-rw-r--r-- | same/src/main/java/com/orbekk/same/MasterServiceImpl.java | 2 |
2 files changed, 1 insertions, 29 deletions
diff --git a/same/src/main/java/com/orbekk/same/MasterApp.java b/same/src/main/java/com/orbekk/same/MasterApp.java index 286b827..7f79830 100644 --- a/same/src/main/java/com/orbekk/same/MasterApp.java +++ b/same/src/main/java/com/orbekk/same/MasterApp.java @@ -12,34 +12,6 @@ public class MasterApp { private static final int timeout = 1000; public void run(int port) { -// ConnectionManagerImpl connections = new ConnectionManagerImpl(timeout, -// timeout); -// State state = new State("MasterNetwork"); -// Broadcaster broadcaster = -// BroadcasterImpl.getDefaultBroadcastRunner(); -// MasterServiceImpl master = new MasterServiceImpl(state, connections, -// broadcaster); -// JsonRpcServer jsonServer = new JsonRpcServer(master, MasterService.class); -// server = new Server(port); -// RpcHandler rpcHandler = new RpcHandler(master); -// rpcHandler.addRpcServer("/MasterService.json", jsonServer); -// server.setHandler(rpcHandler); -// -// Thread masterThread = new Thread(master); -// masterThread.start(); -// -// try { -// server.start(); -// } catch (Exception e) { -// logger.error("Could not start jetty server: {}", e); -// } -// -// try { -// server.join(); -// masterThread.join(); -// } catch (InterruptedException e) { -// logger.info("Received exception. Exiting. {}", e); -// } SameController controller = SameController.create(port); try { controller.start(); diff --git a/same/src/main/java/com/orbekk/same/MasterServiceImpl.java b/same/src/main/java/com/orbekk/same/MasterServiceImpl.java index 7b441b5..6387913 100644 --- a/same/src/main/java/com/orbekk/same/MasterServiceImpl.java +++ b/same/src/main/java/com/orbekk/same/MasterServiceImpl.java @@ -128,7 +128,7 @@ public class MasterServiceImpl implements MasterService, UrlReceiver, Runnable { @Override public void run() { while (!stopped) { - if (_performWork()) { + if (!_performWork()) { synchronized (this) { try { wait(500); |