commit | b37bddeea059b753652474baf8f2580d1ba6642c | [log] [tgz] |
---|---|---|
author | Carmelo Cascone <carmelo@opennetworking.org> | Fri Jun 22 17:25:46 2018 +0200 |
committer | Carmelo Cascone <carmelo@opennetworking.org> | Fri Jun 22 17:25:46 2018 +0200 |
tree | e8b463ca9cea8e2e9fed033fa34268d0e5773b11 | |
parent | 3c216fa4f4e901b5f78d6071ee79b5443ebbb6ce [diff] |
Fixed not relinquishing mastership on role response Change-Id: I9dc1ad094df3e6ef624a5153f24bf977f7b35841
diff --git a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java index a5b49cf..94b3cd5 100644 --- a/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java +++ b/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java
@@ -796,7 +796,7 @@ } else { // we didn't get back what we asked for. Reelect someone else. log.warn("Failed to assert role [{}] onto Device {}", response, deviceId); - if (response == MastershipRole.MASTER) { + if (requested == MastershipRole.MASTER) { mastershipService.relinquishMastership(deviceId); // TODO: Shouldn't we be triggering event? //final Device device = getDevice(deviceId);