Thanks to visit codestin.com Credit goes to github.com
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 99d7d1a commit 37ad03fCopy full SHA for 37ad03f
agent/agent.go
@@ -1272,14 +1272,11 @@ func (a *agent) startReportingConnectionStats(ctx context.Context) {
1272
a.logger.Info(ctx, "skipping stat because nothing changed")
1273
return
1274
}
1275
+ a.latestStat.Store(stats)
1276
1277
select {
1278
case a.connStatsChan <- stats:
- // Only store the latest stat when it's successfully sent!
1279
- // Otherwise, it should be sent again on the next iteration.
1280
- a.latestStat.Store(stats)
1281
- default:
1282
- a.logger.Warn(ctx, "network stat dropped")
+ case <-a.closed:
1283
1284
1285
0 commit comments