diff --git a/cmd/internal/core/phone-home.go b/cmd/internal/core/phone-home.go index 69523bcf..f5df8371 100644 --- a/cmd/internal/core/phone-home.go +++ b/cmd/internal/core/phone-home.go @@ -94,6 +94,8 @@ func (c *Core) ConstantlyPhoneHome(ctx context.Context, interval time.Duration) }) c.phoneHome(ctx, msgs) case <-ctx.Done(): + // wait until all lldp routines to finish + discoveryResultChanWG.Wait() return } }