mirror of
https://github.com/opennetworkinglab/onos.git
synced 2026-05-04 19:56:49 +02:00
ONOS-5674 Fixed to check device type in OF controller device listener
Change-Id: I101427f2f8db215d3e87223b9ffc784b4fa0cca1
This commit is contained in:
parent
5ba6ec1955
commit
e71494d3ec
@ -29,7 +29,6 @@ import org.apache.felix.scr.annotations.Service;
|
||||
import org.onosproject.cfg.ComponentConfigService;
|
||||
import org.onosproject.core.CoreService;
|
||||
import org.onosproject.net.device.DeviceEvent;
|
||||
import org.onosproject.net.device.DeviceEvent.Type;
|
||||
import org.onosproject.net.device.DeviceListener;
|
||||
import org.onosproject.net.device.DeviceService;
|
||||
import org.onosproject.net.driver.DefaultDriverProviderService;
|
||||
@ -87,6 +86,8 @@ import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import static org.onlab.util.Tools.groupedThreads;
|
||||
import static org.onosproject.net.Device.Type.CONTROLLER;
|
||||
import static org.onosproject.net.device.DeviceEvent.Type.DEVICE_REMOVED;
|
||||
import static org.onosproject.openflow.controller.Dpid.dpid;
|
||||
|
||||
@Component(immediate = true)
|
||||
@ -538,7 +539,7 @@ public class OpenFlowControllerImpl implements OpenFlowController {
|
||||
|
||||
@Override
|
||||
public boolean isRelevant(DeviceEvent event) {
|
||||
return event.type() == Type.DEVICE_REMOVED;
|
||||
return event.subject().type() != CONTROLLER && event.type() == DEVICE_REMOVED;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user