commit | 617254077c26ef13764a53652fc815c2164368e6 | [log] [tgz] |
---|---|---|
author | Thiago Santos <thiago@waltznetworks.com> | Fri Aug 05 17:58:56 2016 -0300 |
committer | Jonathan Hart <jono@onlab.us> | Mon Aug 08 17:21:33 2016 +0000 |
tree | 21270e422f449367556197b312f4a0542147a0ab | |
parent | 237ca366a583b78c2b4de65902630fe1a225ef12 [diff] |
[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
diff --git a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java index d4872db..f44c625 100644 --- a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java +++ b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OpenFlowControllerImpl.java
@@ -182,9 +182,7 @@ @Deactivate public void deactivate() { - if (!connectedSwitches.isEmpty()) { - cleanup(); - } + cleanup(); cfgService.unregisterProperties(getClass(), false); }