Skip to content

Commit

Permalink
排除客户端中断导致的503错误 (zeromicro#1343)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhichao authored Dec 20, 2021
1 parent 8315a55 commit 2cdf5e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest/handler/loghandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 2cdf5e7

Please sign in to comment.