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>
This commit is contained in:
Roman Khavronenko 2024-05-20 13:23:09 +02:00 committed by GitHub
parent bc4a0b8f37
commit 7dc18bf67a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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