Adding remove flows on disable flag
Change-Id: Ia31266c3a959bb1049051de7c6e108e3a6cc6d20
diff --git a/internal/pkg/controller/device.go b/internal/pkg/controller/device.go
index ea4ccb3..8d185a3 100644
--- a/internal/pkg/controller/device.go
+++ b/internal/pkg/controller/device.go
@@ -496,10 +496,11 @@
if p.State == PortStateUp {
GetController().PortDownInd(cntx, d.ID, p.Name)
}
+ GetController().PortDelInd(cntx, d.ID, p.Name)
+
d.portLock.Lock()
defer d.portLock.Unlock()
- GetController().PortDelInd(cntx, d.ID, p.Name)
delete(d.PortsByID, p.ID)
delete(d.PortsByName, p.Name)
d.DelPortFromDb(cntx, p.ID)