diff --git a/app/vmagent/remotewrite/remotewrite.go b/app/vmagent/remotewrite/remotewrite.go index 8dd5945600..3107310c51 100644 --- a/app/vmagent/remotewrite/remotewrite.go +++ b/app/vmagent/remotewrite/remotewrite.go @@ -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()