Skip to content

Commit

Permalink
Ignore broken pipe (#177)
Browse files Browse the repository at this point in the history
Seeing this error a lot. It's nested in such a way that we can't seem to
Unwrap it, so do string matching.
  • Loading branch information
pieterhop authored Jan 21, 2025
1 parent b33aa8d commit 134fea0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/util/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ func ShouldIgnoreNetworkError(err error) bool {
case syscall.Errno:
return v == syscall.EPIPE
case *net.OpError:
if v.Op == "write" && strings.Contains(v.Error(), "broken pipe") {
return true
}
return ShouldIgnoreNetworkError(v.Err)
case *os.SyscallError:
return ShouldIgnoreNetworkError(v.Err)
Expand Down

0 comments on commit 134fea0

Please sign in to comment.