From c42de6cc69de0ba75f4795816a36925f6c043f25 Mon Sep 17 00:00:00 2001 From: Gergely Madarasz Date: Tue, 26 Nov 2024 18:10:10 +0100 Subject: [PATCH] Clear shutdownCallbacks after use --- exporter/exporterhelper/internal/queue_sender.go | 1 + 1 file changed, 1 insertion(+) diff --git a/exporter/exporterhelper/internal/queue_sender.go b/exporter/exporterhelper/internal/queue_sender.go index 116ced2d598..c9084839d61 100644 --- a/exporter/exporterhelper/internal/queue_sender.go +++ b/exporter/exporterhelper/internal/queue_sender.go @@ -140,6 +140,7 @@ func (qs *QueueSender) Shutdown(ctx context.Context) error { for _, callback := range qs.shutdownCallbacks { callback() } + qs.shutdownCallbacks = nil if err := qs.queue.Shutdown(ctx); err != nil { return err