From a0f66e553e50235ff1fe4965647eeada6490c7da Mon Sep 17 00:00:00 2001 From: Herman Schaaf Date: Fri, 7 Oct 2022 11:27:18 +0100 Subject: [PATCH] add missing defer --- clients/destination.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clients/destination.go b/clients/destination.go index 85f2d56840..57b9213f1d 100644 --- a/clients/destination.go +++ b/clients/destination.go @@ -113,7 +113,7 @@ func (c *DestinationClient) newManagedClient(ctx context.Context, path string) ( c.wg.Add(1) go func() { - c.wg.Done() + defer c.wg.Done() if err := cmd.Wait(); err != nil { c.cmdWaitErr = err c.logger.Error().Err(err).Str("plugin", path).Msg("plugin exited")