Madan Jampani

Bug fix: Use right nodeId

Change-Id: I87270466fec487a3b0496f75865b1e2a2df32f8a
...@@ -182,7 +182,7 @@ public class ConsistentDeviceMastershipStore ...@@ -182,7 +182,7 @@ public class ConsistentDeviceMastershipStore
182 182
183 String leadershipTopic = createDeviceMastershipTopic(deviceId); 183 String leadershipTopic = createDeviceMastershipTopic(deviceId);
184 NodeId leader = leadershipService.getLeader(leadershipTopic); 184 NodeId leader = leadershipService.getLeader(leadershipTopic);
185 - if (Objects.equal(localNodeId, leader)) { 185 + if (Objects.equal(nodeId, leader)) {
186 return MastershipRole.MASTER; 186 return MastershipRole.MASTER;
187 } 187 }
188 return leadershipService.getCandidates(leadershipTopic).contains(nodeId) ? 188 return leadershipService.getCandidates(leadershipTopic).contains(nodeId) ?
......