[VOL-5565]:stop heartbeat routine before device cleanup
Change-Id: I3b2b8aa98374c46ef57b2320f6549f133a91085d
Signed-off-by: balaji.nagarajan <balaji.nagarajan@radisys.com>
diff --git a/VERSION b/VERSION
index f07249b..7e07446 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.6.15
+4.6.16
diff --git a/internal/pkg/core/device_handler.go b/internal/pkg/core/device_handler.go
index 58bf3bd..ea6eedf 100755
--- a/internal/pkg/core/device_handler.go
+++ b/internal/pkg/core/device_handler.go
@@ -3145,6 +3145,12 @@
if dh.isReadIndicationRoutineActive {
dh.stopIndications <- true
}
+
+ // stop the heartbeat check routine
+ if dh.isHeartbeatCheckActive {
+ dh.stopHeartbeatCheck <- true
+ }
+
dh.lockDevice.RUnlock()
if err = dh.updateDeviceStateInCore(ctx, &ca.DeviceStateFilter{
@@ -3174,10 +3180,7 @@
if dh.isCollectorActive {
dh.stopCollector <- true
}
- // stop the heartbeat check routine
- if dh.isHeartbeatCheckActive {
- dh.stopHeartbeatCheck <- true
- }
+
dh.lockDevice.RUnlock()
dh.StopAllFlowRoutines(ctx)