mirror of https://github.com/docker/docs.git
fix attach
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
2365ec79e6
commit
174f664b3f
|
@ -259,11 +259,17 @@ func proxyHijack(c *context, w http.ResponseWriter, r *http.Request) {
|
|||
errc := make(chan error, 2)
|
||||
cp := func(dst io.Writer, src io.Reader) {
|
||||
_, err := io.Copy(dst, src)
|
||||
if conn, ok := dst.(interface {
|
||||
CloseWrite() error
|
||||
}); ok {
|
||||
conn.CloseWrite()
|
||||
}
|
||||
errc <- err
|
||||
}
|
||||
go cp(d, nc)
|
||||
go cp(nc, d)
|
||||
<-errc
|
||||
<-errc
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue