docker/engine-api

don't close the write connection on docker attach

Closed this issue · 1 comments

I would ask that docker attach not closes the right side of the connection. This is a rather uncommon practice with makes it incredibly hard to implement API compatible services as not many libraries support this kind of behaviour.

To underline this point: hijack.go Line 83 copies out a function from the library it uses for SSL as not even the libraries used by docker itself implement this behavior.

// We need to copy Go's implementation of tls.Dial (pkg/cryptor/tls/tls.go) in
// order to return our custom tlsClientCon struct which holds both the tls.Conn
// object _and_ its underlying raw connection. The rationale for this is that
// we need to be able to close the write end of the connection when attaching,
// which tls.Conn does not provide.

// We need to copy Go's implementation of tls.Dial (pkg/cryptor/tls/tls.go) in

oops depricated repo