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

@ -143,9 +143,7 @@ func serveMavenMetadata(ctx *context.Context, params parameters) {
ctx.Resp.Header().Set("Content-Length", strconv.Itoa(len(xmlMetadataWithHeader)))
ctx.Resp.Header().Set("Content-Type", contentTypeXML)
if _, err := ctx.Resp.Write(xmlMetadataWithHeader); err != nil {
log.Error("write bytes failed: %v", err)
}
_, _ = ctx.Resp.Write(xmlMetadataWithHeader)
}
func servePackageFile(ctx *context.Context, params parameters, serveContent bool) {