Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition (also a regression of the PR 19139) #19231

Closed
wants to merge 1 commit into from
Closed
Changes from all 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
5 changes: 0 additions & 5 deletions server/embed/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ type Etcd struct {
errc chan error

closeOnce sync.Once
wg sync.WaitGroup
}

type peerListener struct {
Expand Down Expand Up @@ -457,7 +456,6 @@ func (e *Etcd) Close() {
}
}
if e.errc != nil {
e.wg.Wait()
close(e.errc)
}
}
Expand Down Expand Up @@ -872,9 +870,6 @@ func (e *Etcd) serveMetrics() (err error) {
}

func (e *Etcd) errHandler(err error) {
e.wg.Add(1)
defer e.wg.Done()

if err != nil {
e.GetLogger().Error("setting up serving from embedded etcd failed.", zap.Error(err))
}
Expand Down
Loading