Skip to content

Commit

Permalink
Fix error EOF handling (#310)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrei Neustroev <[email protected]>
  • Loading branch information
andreineustroev and Andrei Neustroev authored Nov 26, 2024
1 parent be4fd60 commit 7d6f291
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/mover/mover.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"io"
"os"
"errors"

"github.com/goware/prefixer"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -154,7 +155,7 @@ func (m *MoverJob) followLogs(pod corev1.Pod) {

for {
_, err := io.Copy(os.Stdout, prefixReader)
if err != nil && err == io.EOF {
if errors.Is(err, io.EOF) {
m.log.Debug("log stream complete")
break
}
Expand Down

0 comments on commit 7d6f291

Please sign in to comment.