diff --git a/pkg/client/attach.go b/pkg/client/attach.go index 8f75084529..a09393c9ab 100644 --- a/pkg/client/attach.go +++ b/pkg/client/attach.go @@ -270,7 +270,7 @@ func (c *ConmonClient) redirectResponseToOutputStreams( return nil } } - if er == io.EOF || (cfg.ContainerStdin && !cfg.StopAfterStdinEOF) { + if er == io.EOF && cfg.ContainerStdin && !cfg.StopAfterStdinEOF { return nil } if errors.Is(er, syscall.ECONNRESET) {