Committed by
Jonathan Hart
[ONOS-5069] OpenFlowControllerImpl: always cleanup on deactivate
Even if we don't have devices, the sockets/channels must be closed. This is particularly harmful when onos is restarted to form a cluster and the openflow channels are left open. On the next activation it will try to open ports that were already open and it fails Change-Id: I768b9db0b71ffba2805fabf631adcb2039af89e4
Showing
1 changed file
with
1 additions
and
3 deletions
| ... | @@ -182,9 +182,7 @@ public class OpenFlowControllerImpl implements OpenFlowController { | ... | @@ -182,9 +182,7 @@ public class OpenFlowControllerImpl implements OpenFlowController { |
| 182 | 182 | ||
| 183 | @Deactivate | 183 | @Deactivate |
| 184 | public void deactivate() { | 184 | public void deactivate() { |
| 185 | - if (!connectedSwitches.isEmpty()) { | 185 | + cleanup(); |
| 186 | - cleanup(); | ||
| 187 | - } | ||
| 188 | cfgService.unregisterProperties(getClass(), false); | 186 | cfgService.unregisterProperties(getClass(), false); |
| 189 | } | 187 | } |
| 190 | 188 | ... | ... |
-
Please register or login to post a comment