// IsDisconnectedError returns true if the given error is related to a
// disconnected socket.
IsDisconnectedError returns true if the given error is related to a
disconnected socket.
// IsDisconnectedError returns true if the given error is related to a // disconnected socket .
func IsDisconnectedError(err error) bool {
	if err == io.EOF {
		return true 
	}
	netErr, isNetErr := err.(*net.OpError)
	if isNetErr {
		errno, isErrno := netErr.Err.(syscall.Errno)
		if isErrno {
			switch errno {
			default:
			case syscall.ECONNRESET:
				return true 
			}
		}
	}
	return false
}
func IsDisconnectedError ( err error ) bool { if err == io . EOF { return true } netErr , isNetErr := err . ( * net . OpError ) if isNetErr { errno , isErrno := netErr . Err . ( syscall . Errno ) if isErrno { switch errno { default : case syscall . ECONNRESET : return true } } } return false }
IsDisconnectedError returns true if the given error is related to a
disconnected socket.
IsDisconnectedError returns true if the given error is related to a disconnected socket .
// ### return, closed stream ### // ### return, close connection ###