Fix cpu spin waiting for log write events

This loop is not ever going to return since it's never actually setting
the `err` var except on the first iteration.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7a179972ff963706404f91671960b144dec98d65
Component: engine
This commit is contained in:
Brian Goff
2017-02-15 21:41:32 -05:00
parent 3a9737201b
commit ee71506629
@@ -256,9 +256,12 @@ func followLogs(f *os.File, logWatcher *logger.LogWatcher, notifyRotate chan int
handleDecodeErr := func(err error) error {
if err == io.EOF {
for err := waitRead(); err != nil; {
for {
err := waitRead()
if err == nil {
break
}
if err == errRetry {
// retry the waitRead
continue
}
return err