bugfix: DeviceManager#applyRole should ignore NONE
Change-Id: Ib235c4853b0a7e504a8ee42e9bc9eafe99257fc8
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -144,7 +144,7 @@ public class DeviceManager | ... | @@ -144,7 +144,7 @@ public class DeviceManager |
144 | 144 | ||
145 | // Applies the specified role to the device; ignores NONE | 145 | // Applies the specified role to the device; ignores NONE |
146 | private void applyRole(DeviceId deviceId, MastershipRole newRole) { | 146 | private void applyRole(DeviceId deviceId, MastershipRole newRole) { |
147 | - if (newRole.equals(MastershipRole.NONE)) { | 147 | + if (!newRole.equals(MastershipRole.NONE)) { |
148 | Device device = store.getDevice(deviceId); | 148 | Device device = store.getDevice(deviceId); |
149 | // FIXME: Device might not be there yet. (eventual consistent) | 149 | // FIXME: Device might not be there yet. (eventual consistent) |
150 | if (device == null) { | 150 | if (device == null) { | ... | ... |
-
Please register or login to post a comment