Skip to content

Commit

Permalink
partially rollback 19139: no need to wait when closing errc
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Wang <[email protected]>
  • Loading branch information
ahrtr committed Jan 19, 2025
1 parent 88b3938 commit 7e72e74
Showing 1 changed file with 0 additions and 5 deletions.
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

0 comments on commit 7e72e74

Please sign in to comment.