File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -709,8 +709,17 @@ func (cr *connReader) setReadLimit(remain int64) { cr.remain = remain }
709
709
func (cr * connReader ) setInfiniteReadLimit () { cr .remain = maxInt64 }
710
710
func (cr * connReader ) hitReadLimit () bool { return cr .remain <= 0 }
711
711
712
- // may be called from multiple goroutines.
713
- func (cr * connReader ) handleReadError (err error ) {
712
+ // handleReadError is called whenever a Read from the client returns a
713
+ // non-nil error.
714
+ //
715
+ // The provided non-nil err is almost always io.EOF or a "use of
716
+ // closed network connection". In any case, the error is not
717
+ // particularly interesting, except perhaps for debugging during
718
+ // development. Any error means the connection is dead and we should
719
+ // down its context.
720
+ //
721
+ // It may be called from multiple goroutines.
722
+ func (cr * connReader ) handleReadError (_ error ) {
714
723
cr .conn .cancelCtx ()
715
724
cr .closeNotify ()
716
725
}
You can’t perform that action at this time.
0 commit comments