VOL-3049 patch for alarm sync and audit
Change-Id: I400eddba48732d9b3ef5b6212fbda03b5c1f7ef1
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 3422c43..59cd8d0 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -3163,8 +3163,12 @@
dh.setAlarmManagerIsRunning(true)
if stop := <-dh.stopAlarmManager; stop {
logger.Debugw(ctx, "stopping-collector-for-onu", log.Fields{"device-id": dh.device.Id})
- dh.pAlarmMgr.stopProcessingOmciMessages <- true // Stop the OMCI routines if any
dh.setAlarmManagerIsRunning(false)
+ go func() {
+ _ = dh.pAlarmMgr.alarmSyncFsm.pFsm.Event(asEvStop)
+ }()
+ dh.pAlarmMgr.stopAlarmAuditTimer <- struct{}{}
+ dh.pAlarmMgr.stopProcessingOmciMessages <- true // Stop the OMCI routines if any(This will stop the fsms also)
}
}