Merge pull request #1094 from liubin/fix/991

runtime: sleep 1 second after GetOOMEvent failed
This commit is contained in:
Fupan Li
2020-11-11 14:33:57 +08:00
committed by GitHub

View File

@@ -20,6 +20,8 @@ import (
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/pkg/oci"
)
const defaultCheckInterval = 1 * time.Second
func wait(s *service, c *container, execID string) (int32, error) {
var execs *exec
var err error
@@ -152,6 +154,7 @@ func watchOOMEvents(ctx context.Context, s *service) {
if isGRPCErrorCode(codes.NotFound, err) || err.Error() == "Dead agent" {
return
}
time.Sleep(defaultCheckInterval)
continue
}