[VOL-5384] - openonu adapter crash during delete device
Change-Id: I37e9d0ff6e8ef35fe8a4e930dccc9bffb9ad28ae
Signed-off-by: Sridhar Ravindra <sridhar.ravindra@radisys.com>
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 319012c..6f983a9 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -4105,7 +4105,10 @@
defer dh.mutexFlowMonitoringRoutineFlag.RUnlock()
logger.Debugw(context.Background(), "get-flow-monitoring-routine",
log.Fields{"device-id": dh.device.Id, "isFlowMonitoringRoutineActive": dh.isFlowMonitoringRoutineActive})
- return dh.isFlowMonitoringRoutineActive[uniID]
+ if len(dh.isFlowMonitoringRoutineActive) != 0 {
+ return dh.isFlowMonitoringRoutineActive[uniID]
+ }
+ return false
}
func (dh *deviceHandler) StartReconciling(ctx context.Context, skipOnuConfig bool) {