summaryrefslogtreecommitdiff
path: root/same/src
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-31 12:38:43 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-01-31 12:38:43 +0100
commit411fbcf6bceb858daec6192cd920f2b13226a169 (patch)
treec453b9a321c27fa1b7137b4fc1f7c44011b5afbd /same/src
parentc379936c0c324dc1d24754c34010315eab49bed7 (diff)
Clean up MasterApp.
Diffstat (limited to 'same/src')
-rw-r--r--same/src/main/java/com/orbekk/same/MasterApp.java28
-rw-r--r--same/src/main/java/com/orbekk/same/MasterServiceImpl.java2
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);