mirror of
https://github.com/containers/podman.git
synced 2025-06-24 19:42:56 +08:00
Merge pull request #15665 from thediveo/data-race
fixes data race in system.Events and nil error logging
This commit is contained in:
@ -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)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user