summaryrefslogtreecommitdiff
path: root/same/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'same/src/main/java/com')
-rw-r--r--same/src/main/java/com/orbekk/same/Client.java5
-rw-r--r--same/src/main/java/com/orbekk/same/Master.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/same/src/main/java/com/orbekk/same/Client.java b/same/src/main/java/com/orbekk/same/Client.java
index b210b6b..53d0ac8 100644
--- a/same/src/main/java/com/orbekk/same/Client.java
+++ b/same/src/main/java/com/orbekk/same/Client.java
@@ -103,7 +103,8 @@ public class Client {
listener.stateChanged(state.getComponent(component));
}
} else {
- logger.warn("Ignoring update: {}",
+ logger.warn("Ignoring update: {) => {}",
+ state.getComponent(component),
new State.Component(component, revision, data));
}
}
@@ -261,7 +262,7 @@ public class Client {
} catch (CancellationException e) {
}
if (!currentMasterProposal.isCancelled() && result != null) {
- masterController.enableMaster(state, result);
+ masterController.enableMaster(new State(state), result);
}
}
diff --git a/same/src/main/java/com/orbekk/same/Master.java b/same/src/main/java/com/orbekk/same/Master.java
index 529d729..6041cf1 100644
--- a/same/src/main/java/com/orbekk/same/Master.java
+++ b/same/src/main/java/com/orbekk/same/Master.java
@@ -13,7 +13,7 @@ public class Master {
private String myUrl;
State state;
private Broadcaster broadcaster;
- private volatile int masterId = 0;
+ private volatile int masterId = 1;
public static Master create(ConnectionManager connections,
Broadcaster broadcaster, String myUrl, String networkName) {