This commit is contained in:
Victor Vieux 2013-06-27 12:57:19 +00:00
Родитель e68a23bdc1
Коммит 9d3ec7b39f
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -1474,9 +1474,15 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
if in != nil {
io.Copy(rwc, in)
}
if err := rwc.(*net.TCPConn).CloseWrite(); err != nil {
if tcpc, ok := rwc.(*net.TCPConn); ok {
if err := tcpc.CloseWrite(); err != nil {
utils.Debugf("Couldn't send EOF: %s\n", err)
}
} else if unixc, ok := rwc.(*net.UnixConn); ok {
if err := unixc.CloseWrite(); err != nil {
utils.Debugf("Couldn't send EOF: %s\n", err)
}
}
// Discard errors due to pipe interruption
return nil
})