Ignore useless error message "broken pipe" (#30801)

Fix #30792

(cherry picked from commit 53b55223d167c3fc996dd0278a656f421408ace7)
This commit is contained in:
wxiaoguang 2024-05-03 10:39:36 +08:00 committed by Earl Warren
parent b29190c4f0
commit d93d62371c
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 4 additions and 7 deletions

View file

@ -13,6 +13,7 @@ import (
"path"
"strconv"
"strings"
"syscall"
"time"
user_model "code.gitea.io/gitea/models/user"
@ -80,7 +81,7 @@ func (ctx *Context) HTML(status int, name base.TplName) {
}
err := ctx.Render.HTML(ctx.Resp, status, string(name), ctx.Data, ctx.TemplateContext)
if err == nil {
if err == nil || errors.Is(err, syscall.EPIPE) {
return
}