commit | 03265dd2dac6c23d2cc3d9768fe8557161fcadc7 | [log] [tgz] |
---|---|---|
author | Victor Silva <victor@waltznetworks.com> | Thu Dec 08 11:20:36 2016 -0300 |
committer | Jonathan Hart <jono@onlab.us> | Wed Jan 11 18:10:29 2017 +0000 |
tree | f745f48dc80ab455c90f09cf57246f6e78c9175d | |
parent | bc0d76f21c9ed559b56681e325720a6b1533768d [diff] |
[ONOS-5794] OFDeviceProvider: always stop collectors In larger topologies, switchRemoved occasionally triggered exceptions before it reached the code to stop the collectors, leaving these collectors trying to talk to devices even if they were no longer there. Change so that stopCollectorIfNeeded is always called, as it is in other OpenFlow provider classes. Change-Id: I3556a19b5fd15fe73816a785d886a27344df89e4
diff --git a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java index a4098fa..0df2c8c 100644 --- a/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java +++ b/providers/openflow/device/src/main/java/org/onosproject/provider/of/device/impl/OpenFlowDeviceProvider.java
@@ -408,11 +408,11 @@ @Override public void switchRemoved(Dpid dpid) { + stopCollectorIfNeeded(collectors.remove(dpid)); if (providerService == null) { return; } providerService.deviceDisconnected(deviceId(uri(dpid))); - stopCollectorIfNeeded(collectors.remove(dpid)); } @Override