I'm getting an error
returned from an io.Copy
call, to which I've passed a socket (TCPConn
) as the destination. It's expected that the remote host will simply drop the connection when they've had enough, and I'm not receiving anything from them.
When the drop occurs, I get this error:
write tcp 192.168.26.5:21277: broken pipe
But all I have is an error
interface. How can I differentiate broken pipe errors from other kinds of error?
if err.Errno == EPIPE...