We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3b79c6 commit b6159ebCopy full SHA for b6159eb
agent/agent.go
@@ -335,32 +335,8 @@ func (a *agent) reportMetadataLoop(ctx context.Context) {
335
a.logger.Error(ctx, "agent failed to report metadata", slog.Error(err))
336
}
337
338
- flushAllMetadata := func() {
339
- wg := sync.WaitGroup{}
340
- defer wg.Wait()
341
- for {
342
- select {
343
- case <-ctx.Done():
344
- return
345
- case mr := <-metadataResults:
346
- wg.Add(1)
347
- go func() {
348
- defer wg.Done()
349
- postMetadata(mr)
350
- }()
351
- continue
352
- default:
353
354
- }
355
356
357
358
for {
359
- // Ensure all backpressured metadata is posted.
360
- if len(metadataResults) > 1 {
361
- flushAllMetadata()
362
363
-
364
select {
365
case <-ctx.Done():
366
return
0 commit comments