MCPcopy Index your code
hub / github.com/docker/cli / CloseWrite

Method CloseWrite

cli/connhelper/commandconn/commandconn.go:212–223  ·  view source on GitHub ↗

CloseWrite allows commandConn to implement halfCloser

()

Source from the content-addressed store, hash-verified

210
211// CloseWrite allows commandConn to implement halfCloser
212func (c *commandConn) CloseWrite() error {
213 // NOTE: maybe already closed here
214 if err := c.stdin.Close(); err != nil && !ignorableCloseError(err) {
215 return err
216 }
217 c.stdinClosed.Store(true)
218
219 if c.stdoutClosed.Load() {
220 c.kill()
221 }
222 return nil
223}
224
225// Close is the net.Conn func that gets called
226// by the transport when a dial is cancelled

Callers 1

CloseMethod · 0.95

Calls 4

killMethod · 0.95
ignorableCloseErrorFunction · 0.85
StoreMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected