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

fix: lock adding to tailnet waitgroup to avoid race (and fix flake)#14195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: lock adding to tailnet waitgroup to avoid race (and fix flake)
  • Loading branch information
@ethanndickson
ethanndickson committedAug 7, 2024
commit98cf24c28c7f14f7ea6df78135e55cbf2676f94e
9 changes: 8 additions & 1 deletiontailnet/conn.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -556,7 +556,6 @@ func (c *Conn) Closed() <-chan struct{} {
func (c *Conn) Close() error {
c.logger.Info(context.Background(), "closing tailnet Conn")
c.watchCancel()
c.telemetryWg.Wait()
c.configMaps.close()
c.nodeUpdater.close()
c.mutex.Lock()
Expand All@@ -567,6 +566,7 @@ func (c *Conn) Close() error {
default:
}
close(c.closed)
c.telemetryWg.Wait()
c.mutex.Unlock()

var wg sync.WaitGroup
Expand DownExpand Up@@ -783,6 +783,13 @@ func (c *Conn) newTelemetryEvent() *proto.TelemetryEvent {
}

func (c *Conn) sendTelemetryBackground(e *proto.TelemetryEvent) {
c.mutex.Lock()
defer c.mutex.Unlock()
select {
case <-c.closed:
return
default:
}
c.telemetryWg.Add(1)
go func() {
defer c.telemetryWg.Done()
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp