func (w *reqResWriter) failed(err error) error {
	w.log.Debugf("writer failed: %v existing err: %v", err, w.err)
	if w.err != nil {
		return w.err
	}

	w.mex.shutdown()
	w.err = err
	return w.err
}
func (w *reqResWriter) failed(err error) error {
	w.log.Debugf("writer failed: %v existing err: %v", err, w.err)
	if w.err != nil {
		return w.err
	}

	w.mex.shutdown()
	w.err = err
	return w.err
}
func ( w * reqResWriter ) failed ( err error ) error { w . log . Debugf ( " " , err , w . err ) if w . err != nil { return w . err } w . mex . shutdown ( ) w . err = err return w . err }
// failed marks the writer as having failed
failed marks the writer as having failed