mirror of
https://github.com/containers/podman.git
synced 2025-06-25 12:20:42 +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 {
|
if cancelChan != nil {
|
||||||
go func() {
|
go func() {
|
||||||
<-cancelChan
|
<-cancelChan
|
||||||
err = response.Body.Close()
|
if err := response.Body.Close(); err != nil {
|
||||||
logrus.Errorf("Unable to close event response body: %v", err)
|
logrus.Errorf("Unable to close event response body: %v", err)
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user