Skip to content

Commit

Permalink
Remove unnecessary nil check
Browse files Browse the repository at this point in the history
This member is never nil, unless the Exporter is created like
&Exporter{}, which is not a thing we support anyway.
  • Loading branch information
krnowak committed Nov 24, 2020
1 parent 30fab28 commit 885570a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions exporters/otlp/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,8 @@ func (e *Exporter) Shutdown(ctx context.Context) error {
var err error

e.stopOnce.Do(func() {
if cc != nil {
// Clean things up before checking this error.
err = cc.shutdown(ctx)
}
// Clean things up before checking this error.
err = cc.shutdown(ctx)

// At this point we can change the state variable started
e.mu.Lock()
Expand Down

0 comments on commit 885570a

Please sign in to comment.