treat http.ErrAbortHandler as broken pipe too

This commit is contained in:
Aman Karmani 2020-12-22 16:12:02 -08:00
parent 7742ff50e0
commit c8af93d50b

View File

@ -66,6 +66,9 @@ func CustomRecoveryWithWriter(out io.Writer, handle RecoveryFunc) HandlerFunc {
} }
} }
} }
if err == http.ErrAbortHandler {
brokenPipe = true
}
if logger != nil { if logger != nil {
stack := stack(3) stack := stack(3)
httpRequest, _ := httputil.DumpRequest(c.Request, false) httpRequest, _ := httputil.DumpRequest(c.Request, false)