优化忽略客户端关闭连接错误条件

This commit is contained in:
GoEdgeLab
2022-08-01 16:53:08 +08:00
parent 5c40fcf2b2
commit a0fa096e65

View File

@@ -1712,7 +1712,7 @@ func (this *HTTPRequest) canIgnore(err error) bool {
}
// 客户端主动取消
if err == errWritingToClient || err == context.Canceled || err == io.ErrShortWrite || strings.Contains(err.Error(), "write: connection timed out") || strings.Contains(err.Error(), "write: broken pipe") {
if err == errWritingToClient || err == context.Canceled || err == io.ErrShortWrite || strings.Contains(err.Error(), "write: connection") || strings.Contains(err.Error(), "write: broken pipe") {
return true
}