[VOL-4686] openonuAdapterGo: Panic during memory leak test
Change-Id: I260a6dbdbad458c3b739f4c3645b3f572b7a6cf8
diff --git a/VERSION b/VERSION
index 10e70bd..5574de9 100755
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.3.27
+1.3.28
diff --git a/internal/pkg/onuadaptercore/device_handler.go b/internal/pkg/onuadaptercore/device_handler.go
index 3aa6835..7674cc8 100644
--- a/internal/pkg/onuadaptercore/device_handler.go
+++ b/internal/pkg/onuadaptercore/device_handler.go
@@ -4114,8 +4114,16 @@
// Note: This function must be called as a goroutine to prevent blocking of further processing!
// first let the objects rest for some time to give all asynchronously started
// cleanup routines a chance to come to an end
- time.Sleep(5 * time.Second)
-
+ time.Sleep(2 * time.Second)
+ if dh.pOnuOmciDevice != nil {
+ if dh.pOnuOmciDevice.PDevOmciCC != nil {
+ // Since we cannot rule out that one of the handlers had initiated any OMCI configurations during its
+ // reset handling (even in future coding), request monitoring is canceled here one last time to
+ // be sure that all corresponding go routines are terminated
+ dh.pOnuOmciDevice.PDevOmciCC.CancelRequestMonitoring(ctx)
+ }
+ }
+ time.Sleep(10 * time.Second)
if dh.pOnuTP != nil {
dh.pOnuTP.PrepareForGarbageCollection(ctx, aDeviceID)
}