diff options
author | Giteabot <teabot@gitea.io> | 2024-05-03 12:20:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-03 04:20:34 +0000 |
commit | ab2ef1ae49bc5e81d0debac85aee687a64fde8b3 (patch) | |
tree | 8849083a9134048fe9492024bd14e3655db0041c /services/context/base.go | |
parent | 7db434bfa94171bdafebd173ddeef5eb6b7db59c (diff) | |
download | gitea-ab2ef1ae49bc5e81d0debac85aee687a64fde8b3.tar.gz gitea-ab2ef1ae49bc5e81d0debac85aee687a64fde8b3.zip |
Ignore useless error message "broken pipe" (#30801) (#30842)
Backport #30801 by wxiaoguang
Fix #30792
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'services/context/base.go')
-rw-r--r-- | services/context/base.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/services/context/base.go b/services/context/base.go index 62fb743714..05b8ab1b9b 100644 --- a/services/context/base.go +++ b/services/context/base.go @@ -234,9 +234,7 @@ func (b *Base) plainTextInternal(skip, status int, bs []byte) { b.Resp.Header().Set("Content-Type", "text/plain;charset=utf-8") b.Resp.Header().Set("X-Content-Type-Options", "nosniff") b.Resp.WriteHeader(status) - if _, err := b.Resp.Write(bs); err != nil { - log.ErrorWithSkip(skip, "plainTextInternal (status=%d): write bytes failed: %v", status, err) - } + _, _ = b.Resp.Write(bs) } // PlainTextBytes renders bytes as plain text |