CloseWrite allows commandConn to implement halfCloser
()
| 210 | |
| 211 | // CloseWrite allows commandConn to implement halfCloser |
| 212 | func (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 |
no test coverage detected