排除客户端中断导致的503错误 (#1343)

master
vic 3 years ago committed by GitHub
parent 8315a55b3f
commit 2cdf5e7395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -185,7 +185,7 @@ func logBrief(r *http.Request, code int, timer *utils.ElapsedTimer, logs *intern
buf.WriteString(fmt.Sprintf("\n%s", body))
}
if ok {
if ok || r.Context().Err() == context.Canceled {
logger.Info(buf.String())
} else {
logger.Error(buf.String())

Loading…
Cancel
Save