Merge pull request #643 from Random-Liu/events-panic

Fix a potential panic.
This commit is contained in:
Lantao Liu 2018-03-05 15:13:23 -08:00 committed by GitHub
commit f24be111ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -137,6 +137,7 @@ func (em *eventMonitor) handleEvent(evt *events.Envelope) {
return
}
logrus.WithError(err).Errorf("Failed to get container %q", e.ContainerID)
return
}
err = cntr.Status.UpdateSync(func(status containerstore.Status) (containerstore.Status, error) {
status.Reason = oomExitReason