mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Make it explicit raw|multiplexed stream implementation being used
fix #35761 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
@@ -50,13 +50,14 @@ func (daemon *Daemon) ContainerAttach(prefixOrName string, c *backend.ContainerA
|
||||
}
|
||||
ctr.StreamConfig.AttachStreams(&cfg)
|
||||
|
||||
inStream, outStream, errStream, err := c.GetStreams()
|
||||
multiplexed := !ctr.Config.Tty && c.MuxStreams
|
||||
inStream, outStream, errStream, err := c.GetStreams(multiplexed)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer inStream.Close()
|
||||
|
||||
if !ctr.Config.Tty && c.MuxStreams {
|
||||
if multiplexed {
|
||||
errStream = stdcopy.NewStdWriter(errStream, stdcopy.Stderr)
|
||||
outStream = stdcopy.NewStdWriter(outStream, stdcopy.Stdout)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user