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
commit c88a48be21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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