app/vmagent: fix panic on shutdown when no global deduplication is co… (#6308)

…nfigured

Follow-up for f153f54d11

Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit 7dc18bf67a)
This commit is contained in:
Roman Khavronenko 2024-05-20 13:23:09 +02:00 committed by hagen1778
parent 45fbcc74e0
commit 8daa1d9505
No known key found for this signature in database
GPG Key ID: 3BF75F3741CA9640

View File

@ -377,8 +377,10 @@ func Stop() {
configReloaderWG.Wait()
sasGlobal.Load().MustStop()
if deduplicatorGlobal != nil {
deduplicatorGlobal.MustStop()
deduplicatorGlobal = nil
}
for _, rwctx := range rwctxs {
rwctx.MustStop()