Skip to content

Commit

Permalink
Merge pull request #15665 from thediveo/data-race
Browse files Browse the repository at this point in the history
fixes data race in system.Events and nil error logging
  • Loading branch information
openshift-merge-robot authored Sep 8, 2022
2 parents 051f8b0 + db33f06 commit d117d08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/bindings/system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ func Events(ctx context.Context, eventChan chan entities.Event, cancelChan chan
if cancelChan != nil {
go func() {
<-cancelChan
err = response.Body.Close()
logrus.Errorf("Unable to close event response body: %v", err)
if err := response.Body.Close(); err != nil {
logrus.Errorf("Unable to close event response body: %v", err)
}
}()
}

Expand Down

0 comments on commit d117d08

Please sign in to comment.