[VOL-5466] Spawn a goroutine to reset AniConfigFSM when “no TCONT instances available” error occurs
Change-Id: I38ae5c484d7f57f474b0b76b9cd4b84f1207e522
Signed-off-by: bseeniva <balaji.seenivasan@radisys.com>
diff --git a/VERSION b/VERSION
index 3d26972..8a50daa 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.12.27
+2.12.28
diff --git a/internal/pkg/avcfg/omci_ani_config.go b/internal/pkg/avcfg/omci_ani_config.go
index c58b18f..758c220 100755
--- a/internal/pkg/avcfg/omci_ani_config.go
+++ b/internal/pkg/avcfg/omci_ani_config.go
@@ -361,7 +361,12 @@
logger.Errorw(ctx, "No TCont instances found", log.Fields{"device-id": oFsm.deviceID, "err": err})
//reset the state machine to enable usage on subsequent requests
oFsm.pUniTechProf.mutexTPState.RUnlock()
- _ = aPAFsm.PFsm.Event(aniEvReset)
+ // obviously calling some FSM event here directly does not work - so trying to decouple it ...
+ go func(aPAFsm *cmn.AdapterFsm) {
+ if aPAFsm != nil && aPAFsm.PFsm != nil {
+ _ = aPAFsm.PFsm.Event(aniEvReset)
+ }
+ }(oFsm.PAdaptFsm)
return
}
oFsm.tcont0ID = tcontInstID