diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-03-12 21:01:43 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-03-12 21:01:43 +0100 |
commit | 882d749ca5a9934c8ae773d76778c1e8381e5595 (patch) | |
tree | 6f50c84290e1f613d299bbe12211b335f2f8927f /same/src/main/java/com/orbekk/same | |
parent | 68145bc0805364fe3e01e4388de5bb70baa56fe0 (diff) |
Fix failing functional test.
Diffstat (limited to 'same/src/main/java/com/orbekk/same')
-rw-r--r-- | same/src/main/java/com/orbekk/same/Client.java | 2 | ||||
-rw-r--r-- | same/src/main/java/com/orbekk/same/Master.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/same/src/main/java/com/orbekk/same/Client.java b/same/src/main/java/com/orbekk/same/Client.java index 2bfee27..4d5965b 100644 --- a/same/src/main/java/com/orbekk/same/Client.java +++ b/same/src/main/java/com/orbekk/same/Client.java @@ -21,7 +21,7 @@ public class Client implements DiscoveryListener { private ConnectionManager connections; State state; private String myUrl; - private String masterUrl; + String masterUrl; private int masterId = -1; private List<StateChangedListener> stateListeners = diff --git a/same/src/main/java/com/orbekk/same/Master.java b/same/src/main/java/com/orbekk/same/Master.java index ba87c12..88177d6 100644 --- a/same/src/main/java/com/orbekk/same/Master.java +++ b/same/src/main/java/com/orbekk/same/Master.java @@ -121,6 +121,10 @@ public class Master { client.setState(c.getName(), c.getData(), c.getRevision()); } + client.masterTakeover( + state.getDataOf(".masterUrl"), + state.getDataOf(".networkName"), + 0); } catch (Exception e) { logger.info("Client {} failed to receive state update.", url); removeParticipant(url); |