Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37ad03f

Browse files
committed
Block on sending stat updates
1 parent99d7d1a commit37ad03f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

‎agent/agent.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,14 +1272,11 @@ func (a *agent) startReportingConnectionStats(ctx context.Context) {
12721272
a.logger.Info(ctx,"skipping stat because nothing changed")
12731273
return
12741274
}
1275+
a.latestStat.Store(stats)
12751276

12761277
select {
12771278
casea.connStatsChan<-stats:
1278-
// 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")
1279+
case<-a.closed:
12831280
}
12841281
}
12851282

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp