Merge pull request #4271 from r4f4/runtime-err-check-fix

runtime: do not check for EOF error in console watcher
This commit is contained in:
Fabiano Fidêncio
2022-05-18 09:49:48 +02:00
committed by GitHub

View File

@@ -1037,15 +1037,13 @@ func (cw *consoleWatcher) start(s *Sandbox) (err error) {
} }
if err := scanner.Err(); err != nil { if err := scanner.Err(); err != nil {
if err == io.EOF { s.Logger().WithError(err).WithFields(logrus.Fields{
s.Logger().Info("console watcher quits") "console-protocol": cw.proto,
} else { "console-url": cw.consoleURL,
s.Logger().WithError(err).WithFields(logrus.Fields{ "sandbox": s.id,
"console-protocol": cw.proto, }).Error("Failed to read guest console logs")
"console-url": cw.consoleURL, } else { // The error is `nil` in case of io.EOF
"sandbox": s.id, s.Logger().Info("console watcher quits")
}).Error("Failed to read guest console logs")
}
} }
}() }()